Results 1 to 7 of 7

Thread: Disable the maximize option

  1. #1
    Join Date
    Sep 2007
    Posts
    172
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default Disable the maximize option

    I have a ready made page and I just wanted to disable the maximize option of internet explorer and want to make the size of my wish of that page like a popup how I do it?

  2. #2
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    if this is an initial window then its usually not very well advised to mess with the width options like that.

    put below in your <head> tags
    Code:
    <script type="text/javscript">
    function resizeWin(var width = 0, var height = 0) {
         if(width <= 0) { width = screen.availWidth; }
         if(height <= 0) { height = screen.availHeight; }
         self.resizeTo(width,height);
         self.
    }
    </script>
    Code:
    <body onload = "resizeWin(760, 600)">
    where 760 is the desired width that you want and 600 is the desired height that you want.
    note the script allows for 1 or both arguments to be omitted which will cause window to use the available width / height of the screen.

    I am not sure other than using the window.open method of disabling those features but if that is what you would like, then i suggest you do not use the script above, but rather
    Code:
    function resizeWin(var url = '', var width = 0, var height = 0) {
         var newWin = window.open(url, newWin, "width="+width+",height="+height+",resize=0");
         newWin.focus();
    }
    </script>

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Code:
    <a href="my_page.htm"
    onclick="window.open(this.href,'_new','width=300, height=350');return false;">Link Text</a>
    Not all browsers will allow it to be non-resizable. IE will, though.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. #4
    Join Date
    Sep 2007
    Posts
    172
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    I have to put this code in body or in head?

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    If you are referring to my response no, it is an ordinary link.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Sep 2007
    Posts
    172
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    What's your msn id sir?

  7. #7
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    It goes in the body... like the rest of the page stuff.
    http://www.dynamicdrive.com/forums/s...d.php?p=114338
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

Bookmarks

Posting Permissions

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