Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Programmtic closure of an opened window

Status
Not open for further replies.

nidgep

Programmer
Sep 4, 2001
80
GB
is it possible to programmtically close an opened child window from the parent window

and

is it possible to force a refresh of the parent window from a child window when the child window is closed?
(onunload for example).

Any help would be apreciated.
 
thanks Dan - the links were exactly what I was looking for

cheers
 
...one more question....

can this be applied if using the window.showModalDialog method?

I have tried this but get an error when closing the child window as it tries to refresh the parent window in its unload event
//this causes the error...
Code:
<body onunload="window.opener.location.href = window.opener.location.href;">


any ideas?
 

I don't think it will work - I think that modal dialogs have a different close method. Check out the MSDN docs (msdn.microsoft.com, or search on Google) to find out.

Hope this helps,
Dan


[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]
[banghead]

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top