delayed popup




JavaScript Source Code 3000: Navigation: Delayed Popup








































Delayed Popup







Automatically opens a new popup window a given number of seconds after the page finishes loading. The script can optionally be configured to close the window after a few seconds.





Note: We configured our demo to open the popup window 2 seconds
after this page finishes loading and to not close the window automatically.




JavaScript Source Code 3000: Navigation: Delayed Popup
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 Apple-s). The script is yours!!!





    





<!-- TWO STEPS TO INSTALL DELAYED POPUP:

1. Copy the coding into the HEAD of your HTML document
2. Add the onLoad event handler into the BODY tag -->

<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->

<HEAD>

<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Ronnie T. Moore, Editor -->
<!-- Web Site: JavaScript Source Code 3000 -->

<! >
<! >

<!-- Begin
closetime = 0; // Close window after __ number of seconds?
// 0 = do not close, anything else = number of seconds

function Start(URL, WIDTH, HEIGHT) {
windowprops = "left=50,top=50,width=" + WIDTH + ",height=" + HEIGHT;
preview = window.open(URL, "preview", windowprops);
if (closetime) setTimeout("preview.close();", closetime*1000);
}

function doPopup() {
url = "http://javascript.internet.com/navigation/delayed-popup-window.html";
width = 267; // width of window in pixels
height = 103; // height of window in pixels
delay = 2; // time in seconds before popup opens
timer = setTimeout("Start(url, width, height)", delay*1000);
}
// End -->
</script>

<!-- STEP TWO: Insert the onLoad event handler into your BODY tag -->

<BODY OnLoad="doPopup();">



<!-- Script Size: 1.27 KB -->










Wyszukiwarka

Podobne podstrony:
popup
2006 05 Password Tricks Customizing the Password Popup Window
popup window5
popup window 001
popup
popup
optimized popup
popup
popup
popup date picker
popup picker demo
Pursuit 2 1 Delayed Delivery Liv Bennett
popup ins image
popup
popup page

więcej podobnych podstron