Forum Moderators: open
Basically I just want to know what are the different ways I can restrict the size of the window?
With the situation I'm in, I have limited access to the entire web page code. I can only do stuff after the body element has been called. Is there a way to restrict the access from there?(please don't ask why HAHA, long story)
I think the above should work :) - you can play with the sizes, scrollbars, resizeable yes,no etc.
I think this is what you are after?
So you could resize the current window...
self.resizeTo(900, 600);
or open a new window and then resize it...
var win = window.open('http://somewhere.blah','','');
win.resizeTo(900, 600);
I'm not aware of any other way to dynamically change the size of the window.
Also, on Mozilla / Phoenix this method can be disabled and the window will not resize. They don't usually like to give that kind of control to the coder because it is very easy to be misused. A site could, in theory, open a new window, size it to 1 x 1, move it off the screen, then, e.g., submit votes for a site every 20 seconds; or could size the window to some gargantuan size like 500000 x 400000 to make it hard to close (the window controls are way off the screen), &c.
Jordan