Results 1 to 2 of 2

Thread: javascript pop open

  1. #1
    Join Date
    Mar 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile javascript pop open

    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,

  2. #2
    Join Date
    Mar 2011
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs down

    In your 'head' do something like this:

    Code:
    window.onload = popups();
    
    function popup(){
    window.open('URL/to/popup.html','PopupName','toolbar=0,location=0,
    status=0,menubar=0,scrollbars=0,resizable=0,width=345,height=400');
    }
    
    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:

    Code:
        setTimeout ('self.close' ()', 1200);
    source: http://www.nowsell.com/pop-ups/pop-up-scripts.html

    google is ur friend.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •