View Full Version : How to make pop-up window fit client's screen

03-14-2005, 06:05 PM
How do you open a new pop-up window whose width is determined by the client's screen?

Currently I open a fixed width window for a 600x800 screen from a link using :-

<a href="" onClick="window.open('pu_filename','winname','width=780,height=400,left=10,right=10,resizable');return false">Click for Pop-up</a>

To make the new window almost fill the client's screen I have tried (unsuccessfully) various bits of code like :-

<a href="" onClick="window.open('pu_filename','winname','width=window.screen.width-20,height=400,left=10,top=10,resizable');return false">Click for Pop-up</a>

and have also tried adding snippets like :-


There is a slight complication in that the link is located in a content frame and the new pop-up containing pu_filename is itself another frameset. This may or may not be relevant.

Any ideas, folks ?

03-15-2005, 02:37 AM
try width=screen.width, height=screen.height)

without the "window".screen.width etc