By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,337 Members | 2,234 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,337 IT Pros & Developers. It's quick & easy.

Howto correct resize a popup window (cross Browser)

P: n/a
GTi
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.

Feb 5 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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
Feb 5 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.