Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-14-2005, 05:05 PM   PM User | #1
maurice
New to the CF scene

 
Join Date: Mar 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
maurice is an unknown quantity at this point
Question How to make pop-up window fit client's screen

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');retu rn 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 :-

windows.document.body.clientWidth=window.screen.width-20

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 ?

Last edited by maurice; 03-14-2005 at 05:08 PM..
maurice is offline   Reply With Quote
Old 03-15-2005, 01:37 AM   PM User | #2
mhonman
New to the CF scene

 
Join Date: Mar 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
mhonman is an unknown quantity at this point
try width=screen.width, height=screen.height)

without the "window".screen.width etc
mhonman is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:11 PM.


Advertisement
Log in to turn off these ads.