Modal RadWindow not closing in Chrome

pabliskpo

New Member
I have a main "Report" page that has some actions the user can take that will open a modal RadWindow, let the user take actions, then click Save and the modal window will close and the main grid refreshes.This works fine in both IE and Firefox, but Chrome does all the "work" but the modal page stays open. This is only true if I hit the Save button; the Cancel button and the close button on the top of the form still work correctly.This is the JavaScript from the child window:\[code\]<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 CloseRadWindow() { var oWnd = GetRadWindow() oWnd.SetUrl(""); oWnd.close(); } function CloseAndRebind(args) { var oWnd = GetRadWindow() oWnd.BrowserWindow.refreshGrid(args); oWnd.SetUrl(""); oWnd.close(); }</script>\[/code\]This is the parent's refreshgrid function:\[code\] <script type="text/javascript"> function refreshGrid(arg) { if (!arg) { $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("Rebind"); } else { $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("RebindAndNavigate"); } } </script>\[/code\]The parent loads the modal window by running:\[code\] protected void btnSplitInvoice_Click(object sender, EventArgs e) { var btn = sender as Button; var item = (GridDataItem)btn.Parent.Parent; long id = long.Parse(item["Id"].Text); var itemType = this.TabStrip1.SelectedIndex == 0 ? "TransferOrderInvoice" : "EquipmentInvoice"; string scriptstring = "var oWindow=radopen('../Misc/SplitInvoice.aspx?id=" + id + "&type=" + itemType + "','SplitInvoice');oWindow.SetModal(true);"; ScriptManager.RegisterStartupScript(this, this.GetType(), "openwindow", scriptstring, true); }\[/code\]The child's save button has a lot of work done in the code behind and then finishes with this:\[code\]ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "mykey", "CloseAndRebind('navigateToInserted');", true);\[/code\]The cancel button is set up as this:\[code\]<button type="button" class="CancelBtn" value="" onclick="CloseRadWindow()"> </button>\[/code\]I found one entry from awhile back that suggested adding \[code\]window.open('', '_self', '');\[/code\] to the close, but that didn't seem applicable (and also didn't work when I tested it for the heck of it).EDIT: When running Chrome with the Console open, I do see that I'm getting an error on the main page when \[code\]refreshgrid\[/code\] is running:\[code\]Cannot call method 'ajaxRequest' of null\[/code\]But not sure if that's what's causing the problem or not. Looking into it more now.
 
Back
Top