Last post Nov 21, 2011 08:02 AM by march11
Nov 17, 2011 03:00 PM|march11|LINK
I have a parent page and child page, both aspx. All is working, but now I would like to close child page, if user leaves child popup page and goes back to parent page and clicks on something else like page index of Gridview. I CANNOT close popup child page
if user goes to another app, or some other location, I only want to close if something on parent page is changed.
I have the PageIndexChange Event set up for other purposes, I would just like to add some functionality, perhaps a script manager to close the child popup page if the Gridview index is changed, java or another way which ever works best.
Any help and examples would be greatly appreciated.
Nov 21, 2011 04:27 AM|Song-Tian - MSFT|LINK
Somewhere at the top of your script in your main document you include a line:var
Now whenever you want to open a new
childwindow make sure you use a line similar to:
You can then have one function such as:
Each child document just needs a button to call this function as follows.
<input type="button" onclick="window.opener.closeAllChildren()">
Nov 21, 2011 08:02 AM|march11|LINK
Sorry, this does not apply at all to what I am trying to do.
First, in order to open the child popup, it must be intitiated by clicking the edit link of a gridview.
My desire was to close the child window say if the user went back to the parent page and clicked on anything other than the update or cancel link, both of which already need to close the child popup. Like if they were to click Edit in the Gridview on another
record, or tried to click on another page index.