I have an asp.net form that opens a radwindow which has a navigateUrl of another asp.net form. I will call this "window1". Next I want to open a second window from window 1, called "window2". All this works great. My problem is that I want to close "window2" without closing window1 ! I have tried numerous examples from the forum, but cannot seem to get it working. When it does anything at all it closes both window1 and window2...Now for some code that I am using...
Code that opens window1:
code that opens window2:
Currently I am trying to close window2 with an html button calling a javascript function, but ideally it would be called from the code-behind.
If I use this function it closes both windows:
If I use this code, I get a "GetRadWindowManager()undefined" error
Please help. I have tried so many things. It seems that geting a reference to the RadWindowManager on the first main page, then referencing a particular window and then calling close makes the most "sense", but I can't seem to get the reference to the manager from window2.
Dana
Code that opens window1:
Dim script As String = "function f(){$find(""" + Me.daypopupwindow.ClientID + """).show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);" ScriptManager.RegisterStartupScript(Page, Page.GetType(), "key", script, True)code that opens window2:
function openAddWindow() { var oBrowserWnd = getRadWindow().BrowserWindow; setTimeout(function () { oBrowserWnd.radopen(null, "jobpopupwindow"); }, 0); }Currently I am trying to close window2 with an html button calling a javascript function, but ideally it would be called from the code-behind.
If I use this function it closes both windows:
function closeActiveWindow() { var oWin = getParentRadWindow(); oWin.close(); }function closeThisWindow() { var omanager = GetRadWindowManager(); var ownd = omanager.getWindowByName("jobpopupwindow"); ownd.close(); }Please help. I have tried so many things. It seems that geting a reference to the RadWindowManager on the first main page, then referencing a particular window and then calling close makes the most "sense", but I can't seem to get the reference to the manager from window2.
Dana