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

RADWindow Function only works first time in IE

3 Answers 47 Views
Window
This is a migrated thread and some comments may be shown as answers.
Jim
Top achievements
Rank 1
Jim asked on 22 Sep 2011, 04:25 PM
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() 
{
    debugger;
    var oWnd = radopen("http://www.google.com", "MyRadWindow");
    oWnd.Show();
}

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!

3 Answers, 1 is accepted

Sort by
0
Dan Lehmann
Top achievements
Rank 1
answered on 22 Sep 2011, 11:08 PM
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">
    <Windows>
        <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" />
    </Windows>
</telerik:RadWindowManager>

Dan
0
Jim
Top achievements
Rank 1
answered on 23 Sep 2011, 04:08 PM
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.
0
Marin Bratanov
Telerik team
answered on 27 Sep 2011, 09:04 AM
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,
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
Tags
Window
Asked by
Jim
Top achievements
Rank 1
Answers by
Dan Lehmann
Top achievements
Rank 1
Jim
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or