Off topic but in the interests of, if not less popup windows, then at
least less broken ones:

You must include code to deal with the fact that you may have already
opened a popup window. Something like this:

    <SCRIPT LANGUAGE="JavaScript">
      <!-- Hide
        var popupwin = null;
        function popup(loc,ww,hh) {
          var mywidth = (ww + 10);
          var myheight = (hh + 10);
          var myspecs = 
"'menubar=1,status=1,resizable=1,location=1,titlebar=1,toolbar=1,scrollbars=1,width=" 
+ mywidth + ",height=" + myheight + "'";
          
          if (popupwin == null || popupwin.closed) {
            popupwin = window.open (loc, 'popupwin', myspecs);
          } else {
            popupwin.close();
            popupwin = window.open (loc, 'popupwin', myspecs);
            
            // If all your windows should be the same
            // size then comment out the above two lines and
            // uncomment the next two lines

            //  popupwin.focus();
            //  popupwin.location.href = loc;
          }
        }
    </SCRIPT>

    <A HREF='javascript://' onClick='popup("foo.gif",300,200); '>Look at foo</A>



This one is good for calling with just an image as the href. You can use
any code you like, including the other example posted here. Just remember
to test whether you already have the window open or not and act
appropriately.


~~~~~~~~~~~
Nick Tonkin

On Tue, 20 Nov 2001, Ben Demonte wrote:

> How to create a browser popup windowhow do I unsubscribe from this list.
> 
>   ----- Original Message ----- 
>   From: Domien Bakker 
>   To: [EMAIL PROTECTED] 
>   Sent: Tuesday, November 20, 2001 6:30 AM
>   Subject: How to create a browser popup window
> 
> 
>   Hello all, 
> 
>   Can anybody give me the "golden" tip of creating a popup browser window 
>   from my mod_perl handler? I want to fill in this popup window with results 
>   generated within my handler. 
> 
>    Is there a module available from CPAN which can handle this? 
> 
>   Thanks in advance! 
> 
>   Met vriendelijke groet / With kind regards, 
>   Domien Bakker 
>   Application Developer 
> 
>   Application development 
>   Operations and Engineering 
>   ZeelandNet BV 
> 
>   Postbus 35 
>   4493 ZG Kamperland 
>   The Netherlands 
>   tel. +31 (0)113 377733 
>   fax +31 (0)113 377784 
>   [EMAIL PROTECTED] 
>   http://ww.zeelandnet.nl/ 
> 
> 
> 
> 
> 

Reply via email to