Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Howto correct resize a popup window (cross Browser)

Reply
Thread Tools

Howto correct resize a popup window (cross Browser)

 
 
GTi
Guest
Posts: n/a
 
      02-05-2006
Does anyone have a script to resize a (popup) window that is cross
browser compatible.
What I realy need is to resize a windows based on the INNER size.

function SetWindowSize(w,h)
{
try
{
top.innerWidth=w;
top.innerHeight=h;
}
catch(e)
{
top.resizeTo(w,h);
}
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
self.moveTo(LeftPosition,TopPosition);
}

With this script the size is different on IE and FF.

 
Reply With Quote
 
 
 
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      02-05-2006
GTi wrote:

> Does anyone have a script to resize a (popup) window that is cross
> browser compatible.


I have one but it no longer works reliably. Since resizing windows
can be prevented by the user, this is no longer a viable approach.

> What I realy need is to resize a windows based on the INNER size.
>
> [...]
> LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
> TopPosition = (screen.height) ? (screen.height-h)/2 : 0;


Nonsense.


PointedEars
 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
user can't resize popup window in IE James Black Javascript 5 05-02-2006 12:53 PM
Resize popup window to fit text Terren ASP General 4 09-29-2005 11:11 AM
Resize an existing popup window Nigel Molesworth Javascript 0 06-24-2005 02:06 PM
New Popup Window from an existing Popup Window Raffi Javascript 4 08-12-2004 01:21 PM
Main > Popup > Popup > Close popup AND new URL in main? Jens Peter Hansen Javascript 7 06-19-2004 08:56 PM



Advertisments