Hi,
I have a window defined inside a user control:
The OpenTrackAndTraceDialogDialog is called from inside an aspx page which contains the user control that contains the above code.
the dlgTrackAndTraceDialog.aspx has the logic to display the content of the dialog: it calls a web service and if the web service returns a URL, it opens up a pop-up by adding an onload event to the body HTML tag, server-side. It then is supposed to close the RadWindow after the real browser pop-up is displayed. Below is the code I use to accomplish this, located inside the dlgTrackAndTraceDialog.aspx:
The popUp function is triggered inside the onload event of the body tag of the dlgTrackAndTraceDialog.aspx page, and I insert it as an attribute during server side if I get a valid URL from the web service call.
Everything works great....except that the RadWindow won't close and even if I click on the close button, it still won't close. I can maximize, and minimize the window though, and I don't get any error messages.
What am I doing wrong? Thank you in advance for your help.
I have a window defined inside a user control:
<telerik:RadScriptBlock ID="rsbMain" runat="server"> |
<script type="text/javascript"> |
//<![CDATA[ |
function OpenTrackAndTraceDialogDialog(Company,DocNum) |
{ |
var oWnd = $find('<%= radTrackAndTraceDialog.ClientID %>'); |
oWnd.setUrl("dialogs/dlgTrackAndTraceDialog.aspx?Company=" + Company + "&DocNum=" + DocNum); |
oWnd.maximize(); |
oWnd.show(); |
} |
//]]> |
</script> |
</telerik:RadScriptBlock> |
<telerik:RadWindowManager ID="rwwDialogs" runat="server" Skin="Office2007" Style="z-index:7100"> |
<Windows> |
<telerik:RadWindow ID="radTrackAndTraceDialog" runat="server" |
ShowContentDuringLoad="false" |
AutoSize="true" |
Modal="false" |
VisibleStatusbar="false" |
ReloadOnShow="false" |
Behaviors="Close, Reload, Move, Maximize" |
height="500px" |
width="500px" |
> |
</telerik:RadWindow> |
</Windows> |
</telerik:RadWindowManager> |
The OpenTrackAndTraceDialogDialog is called from inside an aspx page which contains the user control that contains the above code.
the dlgTrackAndTraceDialog.aspx has the logic to display the content of the dialog: it calls a web service and if the web service returns a URL, it opens up a pop-up by adding an onload event to the body HTML tag, server-side. It then is supposed to close the RadWindow after the real browser pop-up is displayed. Below is the code I use to accomplish this, located inside the dlgTrackAndTraceDialog.aspx:
<script language="JavaScript" type="text/javascript"> |
function GetRadWindow() |
{ |
var oWindow = null; |
if (window.radWindow) |
oWindow = window.radWindow; |
else if (window.frameElement.radWindow) |
oWindow = window.frameElement.radWindow; |
return oWindow; |
} |
function closeCallingWindow() |
{ |
var oWindow = GetRadWindow(); |
//alert(oWindow); |
oWindow.close(); |
} |
function popUp(URL) { |
day = new Date(); |
id = day.getTime(); |
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=550,height=500,left = 600,top = 300');"); |
} |
</script> |
The popUp function is triggered inside the onload event of the body tag of the dlgTrackAndTraceDialog.aspx page, and I insert it as an attribute during server side if I get a valid URL from the web service call.
Everything works great....except that the RadWindow won't close and even if I click on the close button, it still won't close. I can maximize, and minimize the window though, and I don't get any error messages.
What am I doing wrong? Thank you in advance for your help.