HELP!! ScriptResource.axd Causes a JavaScript Error

2 posts, 0 answers
  1. Moises Jaramillo
    Moises Jaramillo avatar
    3 posts
    Member since:
    Jun 2008

    Posted 28 Jul 2008 Link to this post

    When I spell-check a form that contains 2 or more controls as defined in the ControlsToCheckProperty, I get the following error message in the browser:

    Microsoft JScript runtime error: Object required

    I enabled the debugger within my markup and I was able to identify where the error ocurs within the ScriptResource.axd

    if(this.get_element().value!=null){

    try{

    _21=this.get_element().value;

    }

    In this case, the this.get_element() is returning a null reference but the code still gets its value property.

    Since the script is rendered by the HttpHandler, there is no way for me to add an additional check on the script.

    The whole context is as this. An aspx page that already contained MS Ajax Extensions with a ScriptManager and an UpdatePanel. Changing this to the Telerik versions is not an option. It would require thousands of hours of regression testing from our QA team.

    Need help!

  2. Obi-Wan Kenobi
    Obi-Wan Kenobi  avatar
    460 posts
    Member since:
    Aug 2007

    Posted 30 Jul 2008 Link to this post

    You can find a simple  online example with the ControlsToCheck property  here:
    http://www.telerik.com/DEMOS/ASPNET/Prometheus/Spell/Examples/MultipleChecks/DefaultCS.aspx
    I tried it and everything seems to be ok.
    Also I made additional testing and I received the same error as yours when some of the controlIDs in ControlsToCheck is wrong, e.g.:
    <%@ Register TagPrefix="telerik" Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" %> 
    <!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 id="Head1" runat="server">  
        <title>Untitled Page</title> 
    </head> 
    <body> 
        <form id="form1" runat="server">  
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> 
        <div> 
          <asp:TextBox ID="TextBox1" runat="server" Text="aaaa sssssss ffffffffff"></asp:TextBox> 
            <asp:TextBox ID="TextBox2" runat="server" Text="aaaa sssssss ffffffffff"></asp:TextBox> 
            <telerik:RadSpell ID="RadSpell1" runat="server" ControlsToCheck="TextBox1,TextBox3" IsClientID="true" /> 
              
        </div> 
        </form> 
    </body> 
    </html> 
     
    If you correct it everything is OK, e.g.
    <%@ Register TagPrefix="telerik" Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" %> 
    <!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 id="Head1" runat="server">  
        <title>Untitled Page</title> 
    </head> 
    <body> 
        <form id="form1" runat="server">  
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> 
        <div> 
          <asp:TextBox ID="TextBox1" runat="server" Text="aaaa sssssss ffffffffff"></asp:TextBox> 
            <asp:TextBox ID="TextBox2" runat="server" Text="aaaa sssssss ffffffffff"></asp:TextBox> 
            <telerik:RadSpell ID="RadSpell1" runat="server" ControlsToCheck="TextBox1,TextBox2" IsClientID="true" /> 
              
        </div> 
        </form> 
    </body> 
    </html> 
    My opinion is that you have a wrong id in ControlsToCheck. Try one by one all IDs in ControlsToCheck and you will find the wrong one. 
    Hope this helps!
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top