Re: Re: Opening a new window?
| From: | -{ Rene Brehmer }- | Date: | Mon, 14 Apr 2003 16:46:37 +0000 |
| Subject: | Re: Re: Opening a new window? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-143809@lists.php.net to get a copy of this message | ||
You really don't need to define both inner and outer sizes ... you only
need to feed it height and width. On Windows this gives the inner size of
the window, I believe it's the same on X-win on Linux ...
Most of the attributes you've given are not needed in 99% of the cases ...
so usually you can do with this:
newWindow =
open('url','newWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=250,height=400,left=150,top=150')
Plus another thing with JavaScript is that one generally don't use " for
strings ... simply because by using ' you can write HTML tags with " ...
same as in PHP ... except JS don't have variable replacement...
Rene
On Mon, 14 Apr 2003 00:07:29 -0400, Mike Mannakee wrote about "[PHP] Re:
Opening a new window?" what the universal translator turned into this:
>This really is a JavaScript topic, and I'll probably get bitched at for
>responding, but here's some code you can use. Stick this between the header
>tags in your html.
>
> <script language="JavaScript">
> <!--
> function openwin(url)
> {
> var newwin = open(url, "newwin",
>"height=575,width=500,innerHeight=575,innerWidth=500,outerHeight=575,outerWi
>dth=500,screenX=150,left=150,screenY=150,top=150,channelmode=0,dependent=0,d
>irectories=0,fullscreen=0,location=0,menubar=0,resizable=yes,scrollbars=1,st
>atus=0,toolbar=0");
> }
> //-->
> </script>
>Then call is in your links like
><a href="JavaScript:" onClick="openwin('URL GOES HERE')">
>You can change the size of the window and position by editing the values in
>the string that is the 3rd argument in the function. Just don't add any
>spaces in there.
--
Rene Brehmer
This message was written on 100% recycled spam.
Come see! My brand new site is now online!
http://www.metalbunny.net