SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Addict
    Join Date
    Jul 2006
    Posts
    379
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Auto Browser Re-Size....?

    Not what i would like but the client wants the browser re-sized on the site loading/refreshing...

    Been using the following and it works fine.... apart from in Safari.

    Any idea how i can get it working in Safari, or no chance?

    Code JavaScript:
     
    	$(document).ready(function() {
    	window.resizeTo(1152, 866);
    	 });


    Cheers

  2. #2
    doing my best to help c2uk's Avatar
    Join Date
    May 2005
    Location
    Cardiff
    Posts
    1,832
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    please, I urge you to try and convince your client that this isn't in his best interests (unless this is for some internal/intranet app)
    Dan G
    Marketing Strategist & Consultant

  3. #3
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,872
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    It will be very annoying for those who don't know where to find the option in their browser to turn off your ability to do that.

    It will also totally mess up all the other pages loaded in the other tabs in their browser at the same time - even worse if some of those pages do the same thing.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  4. #4
    SitePoint Wizard bronze trophy Immerse's Avatar
    Join Date
    Mar 2006
    Location
    Netherlands
    Posts
    1,661
    Mentioned
    7 Post(s)
    Tagged
    1 Thread(s)
    The resizeTo() function is disabled in Safari (Chrome too, I think) unless you open a popup which contains only the one page (i.e. provide a width and height for the pop-up window). Of course, this may be blocked by ad/ pop-up blockers.

    Best solution? Don't resize the window

  5. #5
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,631
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Like the anti-drugs message goes ... Just Say No!
    Ian Anderson
    www.siteguru.co.uk

  6. #6
    ♪♪ ♪ ♪ ♪ ♪♪ ♪ ♪♪ Markdidj's Avatar
    Join Date
    Sep 2002
    Location
    Bournemouth, South UK
    Posts
    1,551
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by felgall
    It will also totally mess up all the other pages loaded in the other tabs in their browser at the same time - even worse if some of those pages do the same thing.
    LOL. One tab wants to be 800x600, the other 1024x768. I haven't used resizeTo for so long I didn't even think of that scenario!
    LiveScript: Putting the "Live" Back into JavaScript
    if live output_as_javascript else output_as_html end if

  7. #7
    SitePoint Wizard bronze trophy Immerse's Avatar
    Join Date
    Mar 2006
    Location
    Netherlands
    Posts
    1,661
    Mentioned
    7 Post(s)
    Tagged
    1 Thread(s)
    Yeah, so the windows resizes to 912x684 and then no one is happy


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
  •