Loading ...
Sorry, an error occurred while loading the content.

How to set browser resize limitation at 700x200 pixels?

Expand Messages
  • polisetty_bhaskar
    Hi, When I try to resize the window using mouse, it should not allow me to make it smaller than 700x200 pixels. Can anyone guide me to achieve this
    Message 1 of 1 , Mar 2, 2007
    • 0 Attachment
      Hi,

      When I try to resize the window using mouse, it should not allow me
      to make it smaller than 700x200 pixels. Can anyone guide me to
      achieve this functionality?

      I tried resizeTo() function as shown below.
      function resize()
      {
      if (navigator.appName=="Netscape")
      {
      currentWidth = top.outerWidth
      currentHeight = top.outerHeight;
      }
      else
      {
      currentWidth = document.body.clientWidth;
      currentHeight = document.body.clientHeight;
      }
      If (currentWidth <200)
      width=200;
      else
      width=currentWidth;

      If (currentHeight <700)
      height=700;
      else
      height=currentHeight;

      resizeTo(width, height);
      }

      This is registered as <body onResize='resize()'> in the HTML

      Here the limitations are, window gets resized to any extent and then
      once I leave the Mouse, it comes back to 700x200.

      BUT - I would like to know a way where in, window doesn't even get
      smaller than 700x200.

      Moreover this function does not work on IE. It is working on Firefox
      and Netscape only.

      regards,
      Bhaskar.
    Your message has been successfully submitted and would be delivered to recipients shortly.