views:

108

answers:

1

I'm trying to set a limitation for down sizing the browser window. I managed to resize to desirable size if resizing under this limit, but it only works in FF(not in IE and Chrome).

My questions are:

  1. What's the best way for limiting resizing?
  2. Why doesnt resizeTo does not work on Chrome and IE?
A: 

What's the best way for limiting resizing?

Can't be done, sorry. Resizing the browser window is completely out of your control. I'm astonished honestly that it works in FF. What code do you use for that?

The only thing you can do is listen to the document size (or add a resize handler), and react accordingly within the boundaries of your document. You could for example hide the page, and display a warning message, if the user resizes the window below certain boundaries. I would be careful with this, though - there may be special cases of 640x480 displays still around in the PC world, and mobile clients have an average resolution of somewhere around 480x320 at the moment.

Pekka