|
|
|
Set
Multiple Timed Pop-ups
Step One:
Make up your popup code per usual with PopUp Maker.
Important: Remember to use a different Function Name and PopUp
Name for each one if you are using more than one popup in a
given page.
Insert the script(s) in the head of the page, just as you
usually do.
We'll show an outline of how this all goes together at the end
-- it's fairly easy to do.
Step Two:
For each popup -- after the popup scripts you inserted in Step
One -- then you will insert a call for a timer, like this:
CODE |
<script>
setTimeout("doPopUp1()", 15000);
</script>
|
Call the popup function as shown in red. The 15000 shown in
this sample is how long to wait before launching the popup.
The figure is in milliseconds (1000 = 1 second), so, for
example, the sample above is set to wait 15 seconds before
launching the popup.
General Outline:
This shows how it will all go together in the section of your
page. Here, we show how to do two such poppers with different
start times.
CODE |
<head>
<script>
// PopUp Maker 5.0 by CodeBrain.com
// PopUp Window Script
// Place this script in the <head> of your page.
function doPopUp1(){
doPopUp1Window = window.open(... etc. ...);
}
</script>
<script>
// PopUp Maker 5.0 by CodeBrain.com
// PopUp Window Script
// Place this script in the <head> of your page.
function doPopUp2(){
doPopUp2Window = window.open(... etc. ...);
}
</script>
<script>
setTimeout("doPopUp1()", 15000);
</script>
<script>
setTimeout("doPopUp2()", 30000);
</script>
</head>
|
Thus, we have two different popups -- doPopUp1( ) and
doPopUp2( ) -- which will fire respectively at 15000
milliseconds (15 seconds) and 30000 milliseconds (30 seconds).
To do more than two -- just follow the overall pattern.
|
|