www.webdeveloper.com
Results 1 to 7 of 7

Thread: [RESOLVED] force webpage to be minimized to a set size

  1. #1
    Join Date
    Feb 2009
    Posts
    17

    resolved [RESOLVED] force webpage to be minimized to a set size

    When users manually minimize the website window I need the window to minimize up to a certain point and go no further. for example I need the minimum window size to stop at 800 x 600 and get stuck there even if a user tries to minimize it further.

    The code that I am trying to play around with is the following with onresize function but I am not sure how to make it give me what I need.
    Code:
    <head>
        <script>
            function OnResizeDocument () {
                alert ("The size of the window has changed.");
            }
            
            
        </script>
    </head>
    <body onresize="OnResizeDocument ()">
        
    </body>
    Thank you for your help..

  2. #2
    Join Date
    Oct 2003
    Location
    Andover, UK
    Posts
    945
    Not possible. The resizing of Windows is handled by the OS. If a user wants to minimise or resize your page, you can't stop him.

  3. #3
    Join Date
    Feb 2009
    Posts
    17
    Quote Originally Posted by mitya View Post
    Not possible. The resizing of Windows is handled by the OS. If a user wants to minimise or resize your page, you can't stop him.
    thank u for your reply but if thats true how come i hv come across certain websites that will not allow me to manually minimize up to a certain size and yet i can minimize as much as i need on others.

  4. #4
    Join Date
    Oct 2003
    Location
    Andover, UK
    Posts
    945

  5. #5
    Join Date
    Feb 2009
    Posts
    17
    Quote Originally Posted by mitya View Post
    Example?
    i might hv forgotten some examples but look at this code
    Code:
    <html>
        <body onResize='alert("Do NOT resize this window!")'>
    </html>
    in FF you can only resize the window once and should u tzry to resize it again then it will keep popping up the annoying message. if something like that is possible how can it be difficult to specify that if a user resize up to a certain point then go no further..sorry if i am sounding rude...

  6. #6
    Join Date
    Oct 2003
    Location
    Andover, UK
    Posts
    945
    Why would you want to annoy your users? That's not good web design, it's called obtrusive. And besides, it still doesn't stop me shrinking or totally minimising your page; the alert only fires on resize, not DURING resize, so I can easily resize it between alerts. Or turn off JS. Or hit the minimise button. Etc etc.

  7. #7
    Join Date
    Feb 2009
    Posts
    17
    thanks Mitya.....

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles