SYP}{ER
03-14-2003, 01:10 PM
var beenOpened = false;
function enlarge (what,w,h) {
if (!w && !h) {
window.location = what;
}else{
if (beenOpened) {
if (wwin.closed){
alert (wwin.close());
}
}
wwin = window.open (what,'TheWin','width='+w+',height='+h+',resizable=yes');
beenOpened = true;
wwin.focus();
}
return false;
}
I need a window to open which is a certain size. But when I call the function again, I need window of another size to open so I must first close the old window. (resizeTo resizes the window including the chrome. I need to size the frames exactly so I must use window.open again)
For some reason, the window isn't closing :(
Any ideas?
function enlarge (what,w,h) {
if (!w && !h) {
window.location = what;
}else{
if (beenOpened) {
if (wwin.closed){
alert (wwin.close());
}
}
wwin = window.open (what,'TheWin','width='+w+',height='+h+',resizable=yes');
beenOpened = true;
wwin.focus();
}
return false;
}
I need a window to open which is a certain size. But when I call the function again, I need window of another size to open so I must first close the old window. (resizeTo resizes the window including the chrome. I need to size the frames exactly so I must use window.open again)
For some reason, the window isn't closing :(
Any ideas?