devxlogo

Closing a Popup Window Automatically

Closing a Popup Window Automatically

The following code will close a popup window after the user selects to download the file, or if he/she cancels the download.

Between the tags of the document is popped up, add the code below:

In the tag add this:

Somewhere in the body of the document add:

And finally wherever you need them, the links:

Download ? Yes No

Note: This works for both Internet Explorer and FireFox.

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist