Sys.ScriptLoadFailedException. The script /Script.Resource.Axd could not be loaded

4 posts, 0 answers
  1. Jonathan Pfeffer
    Jonathan Pfeffer avatar
    3 posts
    Member since:
    Jan 2010

    Posted 25 Jan 2010 Link to this post

    I am using ASP.NET 2.0 in VS2008 using telerik AJAX Q3 2008.

    I am using a page with several Telerik controls including RadWindow RadGrid etc. RadTextBox rad ToolTip

    when I call txtBox.Focus from the server side where txtBox is a RadTextBox I get the error

    Sys.ScriptLoadFailedException. The script /Script.Resource.Axd could not be loaded.

    What is up?

    If I don't call the Focus() method of the RadTextBox I do not get the javascript error.





  2. Jonathan Pfeffer
    Jonathan Pfeffer avatar
    3 posts
    Member since:
    Jan 2010

    Posted 25 Jan 2010 Link to this post

    Further to that.

    I created a new radTextBox on the form, focus does work on the new one.

    However, the first control that failed is on a div who is defined as:

     

    <div runat="server" id="pnlMovement" style=" background: #E0E0FF;

     

    position: absolute; width: 99%; height: 30px; left: 1px; top: 500px; z-index: 10;

     

     

     

     

     

     

    border-color: Navy; border-style: solid; border-width: thin;">

     

     

     

     

     

     

     

    What I do is I hide and reposition this div as needed.

    The error happens to any RadTextBox on this div and not to any RadTextBox not on the div, therefore it appears that the div is the issue.

    After even further study. The issue seems to be the postback. After a postback it happens.

    Also please note that I am using a RadAjaxPanel for the entire form.

  3. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 28 Jan 2010 Link to this post

    Hello Jonathan,

     Could you paste your aspx and code-behind. How are you repositioning the div, are you taking it outside the RadAjaxPanel?

    Thanks in advance.

    Regards,
    Tsvetoslav
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  4. Jonathan Pfeffer
    Jonathan Pfeffer avatar
    3 posts
    Member since:
    Jan 2010

    Posted 29 Jan 2010 Link to this post

    It turns out after searching the web for this error that I was missing this in my web config

    <

     

    httpHandlers>

     

    ...

    <

     

    add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>

    Since my project predates AJAXs and was not build from an ajax template it was missing

    Thanks.

     

Back to Top