Results 1 to 6 of 6

Thread: resize browser window

  1. #1
    Join Date
    Dec 2005
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default resize browser window

    hey, whats the code to resize the users browser window to a specified width and height?

  2. #2
    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

    Example:

    Code:
    <script type="text/javascript">
    window.resizeTo(500, 500);
    </script>
    Usage:

    window.resizeTo(width, height);
    - John
    ________________________

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

  3. #3
    Join Date
    Dec 2005
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    i thought that was it. the reason i doubted it was because its not supported by the Safari browser. is there a script that works on all browsers?

  4. #4
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by mavrick422
    i thought that was it. the reason i doubted it was because its not supported by the Safari browser. is there a script that works on all browsers?
    No, and it can be disabled in several of those browsers that do.

    Mike

  5. #5
    Join Date
    Dec 2005
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    you said there isn't a universal script? how would i disable safari from disabling the script?

  6. #6
    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

    Generally, taking control of the user's interface like that isn't very polite. It is tempting, to render a particular effect. I will even do it on occasion. However, I am happy to let Safari users render it however that browser will and other browsers (as configured), as long as the content is still accessible. If I know that the vast majority of users will get the special effect and that of the rest, 99.99% will still at least see the content, that is good enough for me.

    On the other hand, if my target market was like 75% Safari users, I'd find a different approach, rather than trying to override that browser's default settings.
    - John
    ________________________

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

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
  •