AJax and JavaScript References

3 posts, 1 answers
  1. Dennis
    Dennis avatar
    62 posts
    Member since:
    Oct 2007

    Posted 06 Feb 2008 Link to this post

    I am able to create a web page with the RadAjaxManager using the settings to set the specific control to cause the post and the control to receive the results, and it works as expected.

    But if I add a JavaScript reference into the body as below, instead of responding to the Ajax request/response, it seems like the page performs a full refresh (you can see the flash). If I add the reference into the header, I receive all kinds of errors in the Resource Scripts.

    What is the appropriate method for adding the JavaScript reference so that it works?

    <script language="javascript" type="text/javascript" src="Scripts/EventHandlers.js" />

  2. Dennis
    Dennis avatar
    62 posts
    Member since:
    Oct 2007

    Posted 06 Feb 2008 Link to this post

    I'm not happy with this workaround, but it seems to work in initial testing, but I would like to a have a defnitive answer from Telerik on the issue.

    Using inline script at the bottom of the body that reads as follows to dynamically load the script from the client. 

    var eventHandlers = document.createElement ("script");

    eventHandlers.id =

    "Workspace.EventHandlers";

    eventHandlers.type =

    "text/javascript";

    eventHandlers.src=

    "Scripts/EventHandlers.js";

    document.getElementsByTagName ("head") [0].appendChild (eventHandlers);

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Answer
    Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 07 Feb 2008 Link to this post

    Hi Dennis,

    You should not use self closing script tags - this will cause rendering issues in IE. You can check this link:

    http://webbugtrack.blogspot.com/2007/08/bug-153-self-closing-script-tag-issues.html

    Sincerely yours,
    Vlad
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top