Hello,
I have a project that basically looks like this:
I suspect the problem is in the VendorDetails.aspx RadWindow. This window contains the following Javascript:
I have a project that basically looks like this:
- Default.aspx - the page from which all activity begins
- Vendors.aspx - a page displayed in a RadWindow opened from Default.aspx
- VendorDetails.aspx - a page displayed in a RadWindow opened from Vendors.aspx which is used to add/edit a vendor.
When I open for the first time the Vendors window from Default.aspx and do some add/edit operation using the VendorDetails window (close/open several times), there is no problem. After I close the Vendors window, then open it again from Default.aspx, then open the VendorDetails, the first time I close the VendorDetails window, I get an error: Microsoft JScript runtime error: Can't execute code from a freed script.
I'm displaying the VendorDetails using Javascript:
var parentRadWindowManager = GetRadWindow().BrowserWindow.GetRadWindowManager();var oWnd2 = parentRadWindowManager.open("VendorDetails.aspx?VendorID=0", "rwAddNewVendor"); window.setTimeout(function () { oWnd2.set_title("Add new vendor"); oWnd2.setActive(true); oWnd2.set_modal(true); oWnd2.setSize(800, 420); oWnd2.set_behaviors(Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Close); oWnd2.set_visibleStatusbar(false); oWnd2.set_showContentDuringLoad(false); oWnd2.center(); oWnd2.add_close(RefreshGrids); }, 0);return false;I suspect the problem is in the VendorDetails.aspx RadWindow. This window contains the following Javascript:
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> <script 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 windowClose() { var oWindow = GetRadWindow(); oWindow.showConfirm = false; oWindow.argument = null; oWindow.close(); return false; } </script></telerik:RadCodeBlock>