View Full Version : javascript pop open

03-03-2011, 05:25 AM
hello ,

i want to open 3 pop up window when my website is open with interval of 5 second. if any user close any pop up then another one pop up should be opened. so limit of opening popup is maximum 3.

If user close 2 pop up then only 2 pop up should be opened.

Thanks in advance,

03-04-2011, 12:09 AM
In your 'head' do something like this:

window.onload = popups();

function popup(){

function popups() {
url = "URL/to/popup.html";
width = 320; // width of window in pixels
height = 390; // height of window in pixels
// copy paste to change more or less popups, time is seconds*1000.
setTimeout("popup(url, width, height)", delay*10000);
setTimeout("popup(url, width, height)", delay*20000);
setTimeout("popup(url, width, height)", delay*30000);

you can also close a popup automaticaly. include this in ur popup file:

setTimeout ('self.close' ()', 1200);

source: http://www.nowsell.com/pop-ups/pop-up-scripts.html

google is ur friend.