The javascript "resizeTo" function not working in Chrome and Opera
The resizeTo (that allows setting a new height/width value) function works great on Firefox and Internet Explorer and doesn't work at all on Chrome and Opera.
Is there another function that does the same and works on all the browsers?
Thank you,
Regards
No, there isn't another function.
The resizeTo
method is disabled by default in several browsers, and I know that it can also be manually disabled in Firefox.
It has been widely misused, so most browser vendors feel that it should be disabled, or at least a user controllable option.
On my way it isn't possible to resize the window when it is on top-level. (so not a pop-up)
And i think that chrome got it right by not allowing top level windows to be resized.
You can solve it:
Resizing won't work for top-level tabs, and when you open sample.htm it's opened as a top-level tab. If you instead opened it as a pop-up (for example using window.open with a width and a height set), resizeTo should work.