Re: new window size
by "Lisa Bradshaw" <zibbler(at)web-design-cs.com>
|
Date: |
Wed, 11 Sep 2002 10:47:28 -0400 |
To: |
"HWG" <hwg-techniques(at)mail.hwg.org> |
References: |
woram |
|
todo: View
Thread,
Original
|
|
Hmmmm... not sure what I'm doing wrong here, but it's not working for me.
Here's the code I have:
function smallWin(fileName,w,h,x,y)
{
aWindow=window.open(fileName, "width=" + w + ", height=" + h + ",
resizable=yes, scrollbars=yes");
aWindow.moveTo(x,y);
}
</script>
</head>
<body>
<img src="thumbnails/tn_me_tunnel.jpg" width="138" height="88"
onclick="smallWin('tunnel.htm',600,400,100,50;" />
Any ideas?
Lisa
----- Original Message -----
From: "John Woram" <john(at)woram.com>
To: "Lisa Bradshaw" <zibbler(at)web-design-cs.com>; "HWG"
<hwg-techniques(at)mail.hwg.org>
Sent: Wednesday, September 11, 2002 9:46 AM
Subject: RE: new window size
> Lisa Bradshaw wrote: "When the user clicks the thumbnail, I want a new
> window to open that is set to a specific size and position on the
> screen."
>
> This works for me:
>
> function smallWin(fileName,w,h,x,y)
> {
> aWindow=window.open(fileName, "windowName", "width=" + w + ",height="
> + h + ",resizable=yes");
> aWindow.moveTo(x,y)
> }
>
> and in the body...
>
> <img src="THUMBNAIL.JPG"
> onclick="smallWin('FOOBAR.HTM',600,400,100,50;" />
>
> When you click on the thumbnail image, FOOBAR.HTM opens in a new 600 x
> 400 pixel window. The upper left-hand corner is 100 pixels from the
> left edge and 50 pixels down in the browser window.
>
> Omit the "+" sign and ",resizable=yes" if you don't want the window to
> be resizable, and/or add other paramters (scrollbars=yes, for example)
> if you want them. Any parameter *not* added won't be seen. If you
> don't want a window name, be sure to include a pair of empty quotes
> and a comma anyway.
>
> Here's an example:
>
> http://www.galapagos.to/ships.htm
>
> John
>
>
>
>
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA