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

calling a javascript function in a RadWindow error

1 Answer 25 Views
Window
This is a migrated thread and some comments may be shown as answers.
Joe Buckle
Top achievements
Rank 1
Joe Buckle asked on 06 Apr 2010, 05:45 PM
Good day!

I'm trying to call a function in a RadWindow with the follow code:

var

 

dialog = oWnd.get_windowManager().getWindowByName("MyWindow");

 

 

var contentFrm = dialog.get_contentFrame();

 

 

var contentWin = contentFrm.contentWindow;

 

 

 

contentWin.foo();

In IE 8, I initially got an error that the method does not exist. When I did it the second time, it worked. But in Chrome, it completely doesn't work. Why is this so?

Thanks.

 

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 07 Apr 2010, 07:32 AM
Hello Joe,

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.


Best wishes,
Georgi Tunev
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? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Window
Asked by
Joe Buckle
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or