Two Popups on One Click

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • shiva.kodityala@gmail.com

    Two Popups on One Click

    On click of a button on one page, I would like to activate a popup2-
    url. However, popup2 needs another url, popup1-url completely loaded.

    That means, I have to do two popups. popup2-url after completely
    loading popup1-url. Is there any way to know if popup1-url is totally
    loaded.

    Thanks
  • SAM

    #2
    Re: Two Popups on One Click

    shiva.kodityala @gmail.com a écrit :
    On click of a button on one page, I would like to activate a popup2-
    url. However, popup2 needs another url, popup1-url completely loaded.
    >
    That means, I have to do two popups. popup2-url after completely
    loading popup1-url. Is there any way to know if popup1-url is totally
    loaded.
    I think no.

    But you can have your 1st popup that opens the 2nd when it's loaded

    <body onload="opener. popup2(url2);" blah >

    with the 2nd popup's function in main page's JS



    In fact you probably can get the mother which launches the 2nd popup.

    function pop1(url1, url2) {
    if(typeof pop1 == 'undefined' || pop1.closed)
    pop1=window.ope n('','','width= 300,height=300, left=10');
    pop1.onload = function(){open er.pop2(url2);} ;
    pop1.location = url1;
    pop1.focus();
    }
    function pop2(url) {
    if(typeof pop2 == 'undefined' || pop2.closed)
    pop2=window.ope n('','','width= 300,height=300, left=350');
    pop2.location = url;
    pop2.focus();
    }

    not tested

    --
    sm

    Comment

    • Thomas 'PointedEars' Lahn

      #3
      Re: Two Popups on One Click

      shiva.kodityala @gmail.com wrote:
      On click of a button on one page, I would like to activate a popup2-
      url. However, popup2 needs another url, popup1-url completely loaded.
      >
      That means, I have to do two popups. popup2-url after completely
      loading popup1-url. Is there any way to know if popup1-url is totally
      loaded.
      1. Don't.

      2. This can be facilitated easily with calling window.open() (best
      indirectly, with feature test) from the `onload' attribute of the
      `body' element of the first popup window. However, popup blockers
      are specifically designed to block such unrequested popups, and
      they are built into many windowed user agents nowadays.


      PointedEars
      --
      Prototype.js was written by people who don't know javascript for people
      who don't know javascript. People who don't know javascript are not
      the best source of advice on designing systems that use javascript.
      -- Richard Cornford, cljs, <f806at$ail$1$8 300dec7@news.de mon.co.uk>

      Comment

      Working...