RADWindow Function only works first time in IE

4 posts, 0 answers
  1. Jim
    Jim avatar
    3 posts
    Member since:
    Nov 2007

    Posted 22 Sep 2011 Link to this post

    I have this issue where I call a function to open a radwindow that works fine in FF but only works the first time in IE...

    function MyFunction() 
        var oWnd = radopen("http://www.google.com", "MyRadWindow");

    very simple I know...I hit the break point fine everytime in FF but in IE only the first time...
    here is how I am calling the function...there are hyperlink controls in a repeater...
    lnk.Attributes.Add("onClick", "javascript: MyFunction(); return false;");

    the error that I get is: Microsoft JScript runtime error: Object doesn't support this property or method

    as if it doesn't see the function. if a change the myfunction() to alert("hello") it works every time...

    am I missing something?  thanks!
  2. Dan Lehmann
    Dan Lehmann avatar
    103 posts
    Member since:
    May 2011

    Posted 22 Sep 2011 Link to this post

    Try this single line of javascript instead:

    window.radopen("http://www.google.com", "MyRadWindow");

    Assuming you have something like this on your page also:
    <telerik:RadWindowManager runat="server" ID="RadWindowManager1" EnableShadow="true" RestrictionZoneID="form1" KeepInScreenBounds="true">
            <telerik:RadWindow ID="MyRadWindow" runat="server" RegisterWithScriptManager="true" ReloadOnShow="true"
                ShowContentDuringLoad="false" Width="838px" Height="400px"
                Title="My Window" Behaviors="Move, Resize, Close" Modal="true" VisibleStatusbar="false" VisibleTitlebar="true" />

  3. DevCraft R3 2016 release webinar banner
  4. Jim
    Jim avatar
    3 posts
    Member since:
    Nov 2007

    Posted 23 Sep 2011 Link to this post

    Hi Dan,

    Thanks For your help. I changed the function to the one line as you sugested but the windo only pops the first time. Let me clarify that the error that I get is a script error when I click the URL. I dummied down the example quite a bit because there are parameters that I pass to the function etc... But again it works fine in FF and works fine the first time in IE7.
  5. Marin Bratanov
    Marin Bratanov avatar
    3558 posts

    Posted 27 Sep 2011 Link to this post

    Hi Jim,

    This works fine with me, so what I would advise is that you check for JavaScript errors thrown either by some event handler attached to your custom RadWindow, or for errors thrown by the page you load inside, as some pages that automatically set focus tend to throw a JS error when loaded in an iframe. You can first enable the error notifications from the Internet Options.

    If you are still experiencing difficulties I advise that you open a support ticket and send us a page that reproduces this behavior so we can examine it and see what is going on.

    Best wishes,
    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
Back to Top