G
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.
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.