$find("RadAjaxManager1") returns null

2 posts, 1 answers
  1. Mink
    Mink avatar
    57 posts
    Member since:
    Apr 2009

    Posted 30 Nov 2009 Link to this post

    Hi,

    I have a problem with $find("RadAjaxManager1") returning null.
    This seems to happen because $find("RadAjaxManager1") is called at page load and apparently the javascript object for the RadAjaxManager is not yet created.
    Using a function that calls itself after 300 milliseconds if $find("RadAjaxManager1") returns null until $find("RadAjaxManager1") does return the desired object helps.

    Is there another way to force calls like $find("RadAjaxManager1") to wait until after the RadAjaxManager object is created?

    Regards,

    Mink
  2. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 01 Dec 2009 Link to this post

    Hello mink,

    In order to get the client side object of RadControls on pageload, you can create function that uses the reserved name pageLoad (which fires when page loads) and in the handler you can access the client side object of RadAjaxManager. Give a try with this approach and see whether it is suitable for you.

    JavaScript:
     
        function pageLoad() { 
            var ajaxManager = $find('<%= RadAjaxManager1.ClientID %>'); 
            // Your code 
        } 

    Could you provide some more information about your scenario if this doesn't help?

    -Shinu.
Back to Top