calling a javascript function in a RadWindow error

2 posts, 0 answers
  1. Joe Buckle
    Joe Buckle avatar
    47 posts
    Member since:
    Nov 2009

    Posted 06 Apr 2010 Link to this post

    Good day!

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



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



    var contentFrm = dialog.get_contentFrame();



    var contentWin = contentFrm.contentWindow;




    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?



  2. Georgi Tunev
    Georgi Tunev avatar
    7207 posts

    Posted 07 Apr 2010 Link to this post

    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.
Back to Top