I have a page that pops up a RadWindow when a button is clicked. Works fine in IE7, but in IE8, Opera 9.64 and Chrome the window will flash up for just a moment and then close. The following code samples illustrate the problem.
Parent window:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="TestApp.WebForm1" %> |
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> |
<!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 runat="server"> |
<title></title> |
<script type="text/javascript"> |
function btnOpenRadWindow_onClick() { |
var oManager = GetRadWindowManager(); |
oManager.open("WebForm2.aspx", "rwTest"); |
} |
function ccbTest(sender, newText) { |
// Do something here |
} |
</script> |
</head> |
<body> |
<form id="form1" runat="server"> |
<telerik:RadScriptManager ID="RadScriptManager1" runat="server"> |
</telerik:RadScriptManager> |
<div> |
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" Skin="Vista" Behavior="Default" InitialBehavior="None" Left="" Top="" Style="display: none;" VisibleStatusbar="False"> |
<Windows> |
<telerik:RadWindow ID="rwTest" runat="server" Behavior="Resize, Close, Move" Behaviors="Resize, Close, Move" InitialBehavior="None" NavigateUrl="WebForm2.aspx" ClientCallBackFunction="ccbTest" Modal="true" ReloadOnShow="True" Style="display: none;" VisibleStatusbar="False" ShowContentDuringLoad="False" AutoSize="true"> |
</telerik:RadWindow> |
</Windows> |
</telerik:RadWindowManager> |
<button id="btnOpenRadWindow" onclick="btnOpenRadWindow_onClick()">Open Window</button> |
</div> |
</form> |
</body> |
</html> |
Popup window:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="TestApp.WebForm2" %> |
<!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 runat="server"> |
<title></title> |
<script type="text/javascript"> |
function btnClose_onclick() { |
var oWindow = GetRadWindow(); |
oWindow.argument = null; |
oWindow.close(0); |
} |
function GetRadWindow() { |
var oWindow = null; |
if (window.radWindow) |
oWindow = window.radWindow; |
else if (window.frameElement.radWindow) |
oWindow = window.frameElement.radWindow; |
return oWindow; |
} |
</script> |
</head> |
<body> |
<form id="form1" runat="server"> |
<div> |
<button id="btnClose" onclick="return btnClose_onclick()" class="ButtonStandard">Cancel</button><br /> |
</div> |
</form> |
</body> |
</html> |
I'm sure I'm doing something wrong since your samples work in these other browsers, but I haven't been able to figure it out yet. Can you shed some light on this please?
John