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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to close a popup after a download

Status
Not open for further replies.

mattpont

Programmer
Jan 31, 2003
66
0
0
GB
Hi,

I have a popup window, which asks a user to tick 2 tickboxes in order for them to download a zip file.

Once they have ticked the boxes, the page redirects to the zip file which downloads no probs.

The 'problem' is that the popup remains. I want to close this popup automatically, but I can't find a way of doing this.

Any help?

Thanks
 
Are you using Javascript or ASP to redirect to the zip file download?

If your using javascript, you might be able to put a final call after the redirect, to the effect of:
Code:
window.close();

I vaguely recall you might need to set window.opener to a null value for some browsers if this is a child window. But I could be mistaken or remembering a browser issue that doesn't exist anymore.

If your handling the redirect from ASP (via a form post or link) then we may have to go at it from another angle.

 
I am doing it from ASP, but it doesn't have to be. It's just the way I started doing it.

I'll try the Javascript way...

Ta
 
Yeah, you can put
Code:
self.close()
in the code for the popup window in javascript after the download is finished.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top