From your code I assume that you have 2 RadWindows opened and you try to call a function in the second RadWindow. I tried that setup on my side and as you can see from the attached movie, everything is working as expected.
In my test, I call the function from a click on a button. In your case however, if you are calling this function automatically, it is possible that the second page is still not fully rendered when you execute that code - for example if you call it when the second RadWindow is opened. If this is the case, I suggest either to use the OnClientPageLoad event or as an alternative - to call your code with a small timeout, enough for the second page to load.
I hope this helps. If you still experience problems, it will be best to open a support ticket and to send me a small sample project that reproduces them, so I could check it locally.
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Telerik Public Issue Tracking
system and vote to affect the priority of the items.