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!

Closing parent window 1

Status
Not open for further replies.

gio2888

Technical User
Oct 26, 2000
64
US
Hi I have an asp page which uses javascript to call window.open...How can I close the window automatically after window.open has been called?

Thanks!!!
 
Sill a self.close() right after the open statement work? I've not done much with pop-up boxes but I think that's a line of code I've seen posted many times.

-kaht

banghead.gif
 
I figured it out, may be you can use this method in the future. On the parent page I set it so that the parent is the opener.

window.opener = self;
window.open ('url');

Then in the child page, I called the parent to close.

window.opener.close();

By setting the parent to be the "opener", you can close the parent in the child page without receiving the prompt. It took me quite a long time to figure this out. SIGH!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top