Web Hosting Offers
See the new scripts recently added to Dynamic Drive. Click here.
Original, practical CSS codes and examples such as CSS menus for your site.
javascript tutorial Browse Basic JavaScript Tutorial
Browse JavaScript Script resources
Browse javascript FAQS
Categories:

javascript tutorial
buy template
Home >> Tutorials >> Advanced javascript tutorials
Javascript >> Popup window example

Open popup On-Unload

This shows how to have a new popup window appear as the current page is exited. It uses the onunload event routine defined in the BODY tag to call a JavaScript routine.

<html> <head><script language="JavaScript">
function pop() {
var W1 = window.open('window-unload','Popup',"toolbar=no,status=no,location=yes, directories=no,menubar=no,scrollbars=yes,resizable=yes,width=160,height=160");
}
</script></head>

<body onunload="pop()" >
</body></html>

 


Page contents: itechies.net - Learn how popup window open when you exit the page
javascript tutorial
javascript book
Buy this book