This is a migrated thread and some comments may be shown as answers.

"Microsoft JScript runtime error: Object doesn't support this property or method" when using Telerik and Mootools

5 Answers 160 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ian
Top achievements
Rank 1
Ian asked on 05 Nov 2008, 01:19 PM
A very basic page
* telerik script manager
* mootools 1.1 (with array.foreach fix for asp.net)
* linkbutton (for postback)
* empty radgrid

In IE7, after postback I get "Microsoft JScript runtime error: Object doesn't support this property or method" on a simple "document.getElementbyId()"

The stack trace was something like
unload handlers -> grid dispose metod -> $get -> getElementById -> error

Page
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="test.aspx.cs" Inherits="Test_Default" %> 
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
<head runat="server"
<title>Untitled Page</title> 
</head> 
<body> 
<form id="form1" runat="server"
     
    <telerik:RadScriptManager ID="RadScriptManager1" Runat="server" /> 
    <script type="text/javascript" src="mootools-1-11.js"></script> 
    
    <asp:linkbutton ID="Button1" runat="server" text="Submit" onclick="Button1_Click" /> 
     
    <telerik:RadGrid ID="grid" runat="server" EnableAjaxSkinRendering="False"
        <MasterTableView> 
            <Columns> 
            </Columns> 
        </MasterTableView> 
    </telerik:RadGrid> 
     
</form> 
</body> 
</html> 

Code behind
using System; 
using System.Collections; 
using System.Web; 
 
public partial class Test_Default : System.Web.UI.Page 
    protected void Page_Load( object sender, EventArgs e ) 
    { 
        // EMPTY 
    } 
 
    protected void Button1_Click( object sender, EventArgs e ) 
    { 
        // EMPTY 
    } 


Any ideas?

5 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 05 Nov 2008, 02:23 PM
Hi joneff,

I don't think that mootools can work fully with Microsoft ASP.NET AJAX. You can try jquery instead.

Kind regards,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Ian
Top achievements
Rank 1
answered on 05 Nov 2008, 04:04 PM
As a start -- indeed MooTools has a problem with MS ASP.NET AJAX, namely Array and foreach method. But, there is a fix for that and with it MooTools works fine with MS ASP.NET AJAX.

Now, as soon as the Telerik script manager is added to the page the problem appears. Moreover we tried several (but not all) different controls and only RadGrid was triggering this error.

And as mentioned this appears in IE and not in FireFox or Safari.

Thus, I do not consider this to be a problem of MooTools alone, but a combination of MooTools, Telerik's extension to the prototypes / constructors and something in MSIE.
0
OL
Top achievements
Rank 1
answered on 02 Sep 2010, 01:11 PM
"there is a fix for that and with it MooTools works fine with MS ASP.NET AJAX"
What's the fix? ;)
Thanks.

EDIT :
My JS error on MSIE what about a "startswith" function.
The following link deals about a conflict between Mootools and MS ASP.NET AJAX and it saved me!
http://www.mail-archive.com/mootools-users@googlegroups.com/msg09045.html (http://gist.github.com/269990)
Hope it helps.
0
Lisa
Top achievements
Rank 1
answered on 27 May 2011, 10:31 PM
Did you ever find a solution to this Mootools, radGrid and IE issue?
0
Veli
Telerik team
answered on 02 Jun 2011, 06:37 AM
Hi Lisa,

Have you considered the discussion linked to by Maxime in the previous post? The workaround itself is posted in github.

Greetings,
Veli
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Grid
Asked by
Ian
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Ian
Top achievements
Rank 1
OL
Top achievements
Rank 1
Lisa
Top achievements
Rank 1
Veli
Telerik team
Share this question
or