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

Rad script manager on master page

1 Answer 149 Views
ScriptManager and StyleSheetManager
This is a migrated thread and some comments may be shown as answers.
andrew
Top achievements
Rank 1
andrew asked on 15 Jul 2011, 11:01 PM
Hi i have a Rad script manager on my master page but im having trouble using the client side api in pages that use the master page e.g. the $find('someid'); doesn't work and returns null.

I think the problem is the script is present in the DOM but it is not finding the Rad controls on the page.

Is there any way to use the script manager from the master page or should the script manager be placed on each page separately?

Thanks Andrew

1 Answer, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 18 Jul 2011, 01:20 PM
Hi Andrew,

The location of RadScriptManager does not dictate when the $find function will work. $find looks for client-side objects, which have been initialized. Depending on where you use it, you will get nulls or the client-side objects of the targeted controls.

The most suitable place to use the function is in the pageLoad event handler, e.g.
function pageLoad() {
    $find("someid");
}

I hope this helps.

All the best,
Simon
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
ScriptManager and StyleSheetManager
Asked by
andrew
Top achievements
Rank 1
Answers by
Simon
Telerik team
Share this question
or