6

I tried opening a new window using

window.open("lookup.htm","lookupWin", "height=400,width=500,resizable=false");

It works fine in IE, but in FF the pop up is still resizable. How can I disable this resizing in FF as well?

David Hall
  • 32,624
  • 10
  • 90
  • 127
Rakesh Juyal
  • 35,919
  • 68
  • 173
  • 214

4 Answers4

15

Read this one from mdc

Window functionality features

resizable

If this feature is set to yes, the new secondary window will be resizable.

Note: Starting with version 1.4, Mozilla-based browsers have a window

resizing grippy at the right end of the status bar, this ensures that users can resize the browser window even if the web author requested this secondary window to be non-resizable. In such case, the maximize/restore icon in the window's titlebar will be disabled and the window's borders won't allow resizing but the window will still be resizable via that grippy in the status bar.

Starting with Firefox 3, secondary windows are always resizable

Bug 177838 - Make all popup windows resizable, ignoring resizable=no

Community
  • 1
  • 1
rahul
  • 184,426
  • 49
  • 232
  • 263
  • THe funny thing is...the argument by Firefox authors was that "the user knows best" regarding window size. Yet, there are several windows in Firefox itself that cant be resized... – mthurlin Nov 11 '09 at 13:49
  • Providing the bug really helps as it is easier to convince upper management. – KSK May 30 '16 at 13:14
9

Yes it doesn't work anymore. Try

<script type="text/javascript">
window.onresize = function() 
{
    window.resizeTo(500,500);
}
window.onclick = function() 
{
    window.resizeTo(500,500);
}
</script>
localtime
  • 141
  • 2
  • 3
  • +1, from me, its working, but the problem is when you try to resize the window by dragging its sides or double click on the top task bar to resize it throws an error. – Bibhu Jul 18 '11 at 08:05
2

I don't think you can. Firefox (and some other browsers) just ignore the "resizable" setting.

Jan Hančič
  • 53,269
  • 16
  • 95
  • 99
  • Good thing too. Web authors have consistently abused the `windowFeatures` and are now having these toys taken away from them. – bobince Nov 11 '09 at 14:42
2

you con configure dom.disable_window_open_feature.resizable to value false, in order to make window.open re sizable work.

  1. Type about:config
  2. Accept the warning
  3. Search by typing resize and press enter ,
  4. Look for dom.disable_window_open_feature.resizable
  5. double click to change the value. false -> you can not resize the popup in firefox.
Shobhit
  • 21
  • 1