The setTimeout Pop-up Method

Test this pop-up method: Using the setTimeout Pop-up Method


Windows IE: OK
Windows Firefox: OK
Windows Safari: OK
Windows Opera: OK
Mac IE: OK
Mac Firefox: OK
Mac Safari: OK

BACK TO LIST OF POP-UP METHODS
BACK TO HOME PAGE



I was expecting some pop-up blocker dissent when I used the setTimeout Pop-up method, since it's trivial to use this method like onLoad to simply pop up a pop-up when the page loads. But no such dissent occurred. Perhaps there are blocker settings for this type of thing . . . ?

Delayed pop-ups may annoy visitors, and Google's algorithm, less than instant ones—it's worth a try(?).

You may use this technique to present pop-up ads, or to solicit subscribers to your ezine, newsletter, or RSS feed. Use if for reminders, warnings, or statistics displaying. You may get survey participants, ask for donations, or use it for political fund raising. You can even inform visitors about some of your other related websites. There is no end to the types of purposes that pop-ups can be used for.

If your pop-up is about thumbnail enlargement, check out What is the easiest way to do thumbnail image enlargement windows? If you want thumbnail enlargement without clicking, check out Making an Image Enlarge When The Mouse Cursor Is Hovering Over It.





THE CODE



<html>
<head><title>The setTimeout Pop-up Method</title>

<script type="text/javascript">

function show(){e=document.getElementById('o');e.style.visibility='visible';}

function hide(){e=document.getElementById('o');e.style.visibility='hidden';}

setTimeout ("show()", 5000)

</script>
</head>
<body>

<p>WAIT 5 SECONDS FOR POP-UP</P>

<div id="o" onclick='hide()' style="position:absolute; left:200px; top:100px; width:100px; height:30px;background-color:lightblue;border:1px solid blue;padding:5px;visibility:hidden">Click to close</div>

</body>
</html>