Popup Toolkit - Timed Popup in a Loop, Tutorial and Demo


This is a timed popup in a loop demo. The popup will open
automatically on each 10 seconds. The popup will auto close
8 seconds after each opening. The auto-closing delay is set
in Popup Toolkit ('Behavior Settings' tab, 'Time Related Behavior'
section, 'Auto close after' field).

Here is how to implement this loop in your web pages.
Say, you have a popup with the default ID "myid"
(the popup ID is set in the 'Popup Code' tab, 'Popup Triggering Codes'
section). To open the popup in timed loop use the
following simple piece of JavaScript code:
<script>
setInterval ( "OpenWin_myid()", 10 * 1000 );
</script>
Note the number 10 in red color above. This is the time period
of the loop in seconds. For example, to set a loop with a
5 minutes period use 5 * 60 = 300 seconds.

If you need to open the popup several times, but not
in an infinite loop then you may use the following
JavaScript code fragment:
<script>
setTimeout ( "OpenWin_myid();", 10 * 1000 ); 
setTimeout ( "OpenWin_myid();", 20 * 1000 ); 
setTimeout ( "OpenWin_myid();", 40 * 1000 ); 
</script>
With this example the popup will open 3 times. The first
time will be 10 seconds after the page loads. The second
time will be 20 seconds after page load. And the third opening
will be 40 seconds after page load. If you need more openings
on certain time intervals place more lines of code like those
above (use copy and paste) and set a time period for each line.

If you have any questions, please contact me at

Home | FAQ / Help / News | Terms of Use | Privacy Policy
Copyright © 2006-2024 Popup-Toolkit.com, All rights reserved.