window resize to required size

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • arkascha

    #1

    window resize to required size

    Hi everybody,
    after trying 'round for hours and wishing all browser engine programmers to
    hell :-) I'd like to ask if anyone knows a solution for this:

    A dynamically created html page contains a body tag with a single (filled)
    table in it. Sie size of the table changes in a wide scale (from 5% to 150%
    of the screen size independent in height and width.
    The page is displayed in a popup window opened either via an onclick-event
    or a href anchor (depends on the navigation). Now the obvious problem is
    this:
    When choosing a fixed window size things look silly most of the time. Either
    you have a nearly empty window or you have to scroll all the time...

    So I want to resize the window. Resize it to what size? The size that is
    required by the pages content when redered in the browser. That's all :-)

    -- hmmm -- I tried around quite a lot with scrollHeigths, offsetWidth and so
    on, but there does not seem to be any more or less reliable solution.,
    Especially not when trying to make stuff usable for different browsers.
    Does anyone have a hint what else I can try, where I could look?

    Thanx in advance for any replies!


    --
    arkascha
  • Martin Honnen

    #2
    Re: window resize to required size



    arkascha wrote:

    [color=blue]
    > So I want to resize the window. Resize it to what size? The size that is
    > required by the pages content when redered in the browser.[/color]

    if (window.sizeToC ontent) {
    window.sizeToCo ntent();
    }
    is supported in Mozilla browsers (Netscape 7, Firefox, Mozilla Suite).

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/

    Comment

    • DU

      #3
      Re: window resize to required size

      Martin Honnen wrote:
      [color=blue]
      >
      >
      > arkascha wrote:
      >
      >[color=green]
      >> So I want to resize the window. Resize it to what size? The size that is
      >> required by the pages content when redered in the browser.[/color]
      >
      >
      > if (window.sizeToC ontent) {
      > window.sizeToCo ntent();
      > }
      > is supported in Mozilla browsers (Netscape 7, Firefox, Mozilla Suite).
      >[/color]

      I see 2 possible problems regarding these browsers.
      1- Edit/Preferences.../Advanced/Scripts & plugins/Allows scripts to:
      Move or resize windows checkbox unchecked will neutralize
      sizeToContent() ; a workaround would be bug 179704

      2- Bug 187815


      DU
      --
      The site said to use Internet Explorer 5 or better... so I switched to
      Mozilla 1.7.3 :)

      Comment

      Working...