GetRadWindow in IE8

9 posts, 1 answers
  1. Craig Wallace
    Craig Wallace avatar
    118 posts
    Member since:
    Jan 2005

    Posted 01 Mar 2012 Link to this post

    Everyone seems to use the same JavaScript function for getting a handle on a radwindow from within itself:
    function GetRadWindow() {
        var oWindow = null;
        if (window.radWindow)
            oWindow = window.RadWindow; //Will work in Moz in all cases, including clasic dialog      
        else if (window.frameElement.radWindow)
            oWindow = window.frameElement.radWindow; //IE (and Moz as well)
        return oWindow;
    }

    This does not seem to work in IE8.  In IE8, both window.radWindow and window.frameElement are null when this is called from within a RadWindow.

    Does anyone know how to get this to work in IE8?

    Thanks.
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 01 Mar 2012 Link to this post

    Hello,

    Check the following forum thread which discussed similar scenario.
    Error open RadWindow in IE8 ?

    Thanks,
    Princy.
  3. Craig Wallace
    Craig Wallace avatar
    118 posts
    Member since:
    Jan 2005

    Posted 01 Mar 2012 Link to this post

    Hi Princy,

    I do not see any solutions in the thread that you linked to other than 'check the version of the controls that you are using'.  I am using 2010.3.1215.40, do I need to upgrade for this to work?

    Thanks,

    Craig
  4. Craig Wallace
    Craig Wallace avatar
    118 posts
    Member since:
    Jan 2005

    Posted 01 Mar 2012 Link to this post

    Hi Princy,

    I have upgraded to 2012.1.215.40 but still have the same problem.

    Any more advice?

    Craig
  5. Craig Wallace
    Craig Wallace avatar
    118 posts
    Member since:
    Jan 2005

    Posted 01 Mar 2012 Link to this post

    I launch the RadWindow with .Show() using JavaScript.  Does that make a difference?
  6. Marin Bratanov
    Admin
    Marin Bratanov avatar
    5807 posts

    Posted 02 Mar 2012 Link to this post

    Hello Craig,

    This is rather strange behavior and I am not sure what may be causing it. Please examine this thread, it relates to a similar issue and my last post also link another thread with two proposed workarounds. Please also confirm your Doctype and that there aren't any other JavaScript errors, especially when opening the RadWindow.


    Greetings,
    Marin
    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 now.
  7. Craig Wallace
    Craig Wallace avatar
    118 posts
    Member since:
    Jan 2005

    Posted 06 Mar 2012 Link to this post

    Hi Martin,

    My doctype is
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    And the HTML tag is

    I'll double-check on there being other errors, but I don't believe there are any.

    I just need a way to close the radwindow without causing a postback. :/

    Craig
  8. Answer
    Marin Bratanov
    Admin
    Marin Bratanov avatar
    5807 posts

    Posted 08 Mar 2012 Link to this post

    Hello Craig,

    Take your time and try to narrow down the scenario. This approach is working well for many clients and the only scenario we know it does not work is when the ContentTemplate is used, as this does not create a separate iframe, but all content is on the page, so the reference is taken by the standard $find() method. This is explained in this demo. If you cannot find an issue in your scenario and the workarounds I previously linked do not work for you please post a simple page that can reproduce this issue so we can investigate it.


    Kind regards,
    Marin
    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 now.
  9. Craig Wallace
    Craig Wallace avatar
    118 posts
    Member since:
    Jan 2005

    Posted 08 Mar 2012 Link to this post

    Hi Martin,

    I am using the ContentTemplate approach!

    I will look at just using $find, thanks!

    Craig
Back to Top