\n\n"; setTimeout('windowProp(text)', 3000); // delay 3 seconds before opening } function windowProp(text) { newWindow = window.open('','newWin','width=300,height=100'); newWindow.document.write(text); setTimeout('closeWin(newWindow)', 5000); // delay 5 seconds before closing } function closeWin(newWindow) { newWindow.close(); // close small window and depart }

Auto Popup Window

Rick Johnson Jan 30, 2001



Home } Text Effects } Auto Popup Window



Automatically opens a small popup window and closes it after a specified time. Great for displaying important messages without forcing users to close multiple windows!
This demo will open a small popup window 3 seconds after the page is loaded and close the window after it has been open for 5 seconds.

The JavaScript Source: Text Effects: Auto Popup Window

Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as Note Pad or Simple Text) and save (Control-s or Command-s). The script is yours!!!

    

Did you use this script?  Do you like this site?  Please link to us!

Leave a Response

(0 comments)