This is a migrated thread and some comments may be shown as answers.

[Solved] $find("RadAjaxManager1") returns null

1 Answer 210 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Mink
Top achievements
Rank 1
Mink asked on 30 Nov 2009, 04:48 PM
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

1 Answer, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 01 Dec 2009, 11:03 AM
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.
Tags
Ajax
Asked by
Mink
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or