Thanks in advance,
John
4 Answers, 1 is accepted
Can you please provide more information about the exact setup that you are having? Where is the function that you use to open the window and how exactly are you opening that RadWindow?
Kind regards,
Georgi Tunev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="WebForm1.aspx.cs" Inherits="ModalDialog.RadWindow.WebForm1" %>
<%
@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml" >
<
head id="Head1" runat="server">
</
head>
<
body class="BODY">
<form id="form1" runat="server">
<
asp:ScriptManager id="ScriptManager"
runat
="server"/>
<script>
function OpenWindow(name)
{
//neither method works....
//var manager = GetRadWindowManager();
//var wnd = manager.open("http://www.google.com", name);
var wnd = window.radopen("http://www.google.com", name);
wnd.set_Modal(
true);
wnd.setSize(400,400);
wnd.show();
return false;
}
</script>
<button onclick = "return OpenWindow('test')" id="button2">Open with radopen</button>
<telerik:radwindowmanager runat="server" ID="RadWindowManager1">
<Windows>
</Windows>
</telerik:radwindowmanager>
<iframe src="http://www.telerik.com" id="jr"/>
</form>
</
body>
</
html>
There's nothing in the code behind class. The call to radopen fails with an undefined reference to the RadWindowManager. If I remove the iframe, it works fine.
Many thanks,
John Rhodes
The problem is not related to our controls and it comes from improper declaration of the iframe element. The right way iframe object should be declared is with its closing tag:
<iframe></iframe>
The provided declaration in your case stops any scripts and content after the declaration. You can have a try to put simple alert JavaScript immediately after the iframe and you will not see it to run.
Please modify your iframe declaration in the shown method above and it should be fine.
All the best,
George
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
That's something I learnt today :-)
John