Have you examined the following help article on calling functions in windows: http://www.telerik.com/help/aspnet-ajax/window-programming-calling-functions.html
? It shows a different way to pass the data that makes sure the page is loaded when you try to call the function. What happens in your case is the following:
2) even if you move the call to show() above your function call the controls on the content page may still not be initialized when the function is called, so you will get an error there, too.
3) it seems you are trying to set the value of a hidden field or textbox in the content page, so you need to use the $get() shortcut, not the $find() shortcut. The former is a shortcut to document.getElementById() which us used for DOM manipulation, while the latter is to findComponent() which is used to access complex ajax-enabled controls (i.e. script controls).
If you do not wish to use the approach that merely passes a value from the article you can use the OnClientPageLoaded event of the RadWindow (e.g. add it dynamically
to call the function in it, then in this handler remove it).
An example of the second approach:
oWnd = GetRadWindowManager().getWindowByName(
oWnd = $get(
oWnd.value = txt
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed