RadAjaxManager & User Control JavaScript

2 posts, 0 answers
  1. Jibber4568
    Jibber4568 avatar
    28 posts
    Member since:
    Jul 2011

    Posted 07 Nov 2012 Link to this post

    Hi Guys,

    I'm experiencing a problem and was hoping you may be able to point out if there is a way round it.

    I have a radtabstrip that is dynamically loading user controls on click via the radajaxmanager.

    This all works as expected except the user controls all contain javascript on them.
    None of the javascript is recognised when loaded via the radajaxmanager and thus a number of controls on the page don't function correctly.

    How should I be implementing javascript within a user control that is loaded dynamically via the radajaxmanager?


  2. Thad
    Thad avatar
    106 posts
    Member since:
    Sep 2010

    Posted 09 Nov 2012 Link to this post

    Hi Jibber,

    Do you have the JavaScript in your UserControl wrapped in a RadScriptBlock?  When Ajax is involved, this is the only way the JavaScript will be preserved after partial page postbacks. 


    <telerik:RadScriptBlock runat="server" ID="rsbInitialize">
        <script type="text/javascript">

    window.$ = window.$telerik.$;

    Let us know if that helps,
Back to Top