Page 1 of 1

Window properties

Posted: Mon Feb 17, 2003 1:29 pm
by uberpolak
I'm looking for a way to either change the properties of the active window or open a new window and then close the active one. This is what I've got so far:

Code: Select all

<BODY onLoad="self.close(); window.open('portdir.php','zork', config='fullscreen=yes, toolbar=no,menubar=no, scrollbars=no, resizeable=no, location=no, directories=no, status=no');">
The problem with this is that it pops up a box asking to close the window. I'm looking for a way to bypass this confirmation. Does anyone know of a way to do this? Thanks

Posted: Tue Feb 18, 2003 1:56 am
by twigletmac
I don't know if you can, I'm assuming the reason it prompts is to prevent the misuse of the ability to close windows - if a popup ad could close the active window it would be really annoying.

Why do you need this functionality?

Mac

Posted: Tue Feb 18, 2003 4:10 am
by volka
window-objects expose a method resizeTo(x,y)
So you may try top.resizeTo(500,400);
afaik you can only close windows that have been opened by a script without an user confirmation

Posted: Tue Feb 18, 2003 12:42 pm
by uberpolak
The reason I wanted this (I found a workaround), was for an application to be run only locally, where I had a window set up the way I like it and wanted it to open like that, closing the window that triggers it. I wouldn't do this to a visitor to a website or anything like that. I wound up using a .hta file to set the properties of the initial window instead.