Resize a browser window to content

Discussion in 'Javascript' started by David Logan, Jul 14, 2004.

  1. David Logan

    David Logan Guest

    Hello,

    I am trying to open a window with a graphic in it and have the window
    be exactly the correct size of the image. Is there anyway to do this
    that will work on any browser on any OS????

    Thanks

    David
     
    David Logan, Jul 14, 2004
    #1
    1. Advertising

  2. David Logan

    kaeli Guest

    In article <>,
    enlightened us with...
    > Hello,
    >
    > I am trying to open a window with a graphic in it and have the window
    > be exactly the correct size of the image. Is there anyway to do this
    > that will work on any browser on any OS????


    No.
    Very little (comparitvely speaking) works on every browser and any OS.

    Mozilla-based browsers, including NN6+ and Firefox, allow a user to turn
    off the resizing of windows. Thank goodness. Because Mozilla users love
    to use tabbed browsing, your resizing the window would resize all the
    other tabs. Which sucks. A lot. I have resizing turned off for precisely
    this reason.
    Opera, which also uses tabbed browsing, might have a similar option.

    You can try to open a new window and resize, but it's never guaranteed.
    Heck, you can't guarantee your users even have script-enabled browsers
    or that they have scripting enabled on their script-enabled browsers.
    Yes, text-based browsers are still in use, though not overly common.
    Disabled (often visually-impaired) users also have special browsers that
    might not even have the option to resize.

    Note that people who use tabbed browsers often have links set to open in
    a new tab, not a new window. It is also pretty common for them to have
    unrequested popups blocked. [1]

    [1] discussions about this on various sites I visit have led me to these
    conclusions. YMMV.

    --
    --
    ~kaeli~
    Who is General Failure and why is he reading my hard disk?
    http://www.ipwebdesign.net/wildAtHeart
    http://www.ipwebdesign.net/kaelisSpace
     
    kaeli, Jul 14, 2004
    #2
    1. Advertising

  3. kaeli <> writes:

    > Opera, which also uses tabbed browsing, might have a similar option.


    Actually, Opera doesn't use tabbed browsing, but rather MDI (Multiple
    Document Interface), where each page is a separate window inside the
    main application window. When all page windows are maximized, it
    looks like tabbed browsing (and resizing fails, since the preferred
    size doesn't matter while maximized).

    However, Opera does have a similar option (Preferences> Multimedia >
    Javascript options > Enable resizing of windows).

    If you open a new window with window.open, and specifies sizes, the
    window is opened as non-maximized.

    /L 'who thinks MDI is superior to simple tabs'
    --
    Lasse Reichstein Nielsen -
    DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
    'Faith without judgement merely degrades the spirit divine.'
     
    Lasse Reichstein Nielsen, Jul 14, 2004
    #3
  4. David Logan

    DU Guest

    David Logan wrote:

    > Hello,
    >
    > I am trying to open a window with a graphic in it and have the window
    > be exactly the correct size of the image. Is there anyway to do this
    > that will work on any browser on any OS????
    >
    > Thanks
    >
    > David



    Yes but it would not work on all browsers, all possible versions and on
    all OSes. It would work on Mozilla-based browsers (rv > 1.3), NS 7.x,
    Opera 7.x, MSIE 6.
    Depending on the fact that the sub-window with a graphic in it is in
    fact an .html file or it is a graphic file only, the answer would be
    differential. Can you clarify this? Also, can you provide an url to show
    what you have done so far?

    DU
     
    DU, Jul 14, 2004
    #4
  5. David Logan

    DU Guest

    kaeli wrote:

    > In article <>,
    > enlightened us with...
    >
    >>Hello,
    >>
    >>I am trying to open a window with a graphic in it and have the window
    >>be exactly the correct size of the image. Is there anyway to do this
    >>that will work on any browser on any OS????

    >
    >
    > No.
    > Very little (comparitvely speaking) works on every browser and any OS.
    >
    > Mozilla-based browsers, including NN6+ and Firefox, allow a user to turn
    > off the resizing of windows. Thank goodness. Because Mozilla users love
    > to use tabbed browsing, your resizing the window would resize all the
    > other tabs. Which sucks. A lot. I have resizing turned off for precisely
    > this reason.


    I think the OP miswrote the subject line with "Resize" when his post
    originally meant to size, to fit the window according to an image (html
    or image?) size.

    I agree with what you say overall.

    DU

    > Opera, which also uses tabbed browsing, might have a similar option.
    >
    > You can try to open a new window and resize, but it's never guaranteed.
    > Heck, you can't guarantee your users even have script-enabled browsers
    > or that they have scripting enabled on their script-enabled browsers.
    > Yes, text-based browsers are still in use, though not overly common.
    > Disabled (often visually-impaired) users also have special browsers that
    > might not even have the option to resize.
    >
    > Note that people who use tabbed browsers often have links set to open in
    > a new tab, not a new window. It is also pretty common for them to have
    > unrequested popups blocked. [1]
    >
    > [1] discussions about this on various sites I visit have led me to these
    > conclusions. YMMV.
    >
     
    DU, Jul 14, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jim Bancroft

    resize a browser window in aspnet?

    Jim Bancroft, May 25, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    1,138
    Jim Bancroft
    May 26, 2005
  2. chris
    Replies:
    43
    Views:
    106,312
    brianberneker
    Feb 17, 2011
  3. Replies:
    2
    Views:
    1,291
    Adrienne
    Feb 13, 2005
  4. Peter Noneley

    Can I resize Excel window from IE browser?

    Peter Noneley, Sep 5, 2003, in forum: Javascript
    Replies:
    3
    Views:
    186
    Peter Noneley
    Sep 5, 2003
  5. chris

    resize browser window on load

    chris, Sep 6, 2004, in forum: Javascript
    Replies:
    21
    Views:
    423
    Grant Wagner
    Sep 21, 2004
Loading...

Share This Page