NEWBIE Question: Autosize pop-up window to table size

Discussion in 'Javascript' started by Patrick, Feb 17, 2004.

  1. Patrick

    Patrick Guest

    I have long used a script to autosize a window to image size and I was
    wondering how I might do the same thing with table size. It seems like
    it should be as simple, but I don't know what I'm doing. Any
    suggestions would be appreciated. Thanks.

    Patrick
     
    Patrick, Feb 17, 2004
    #1
    1. Advertising

  2. Patrick

    KC Wong Guest

    > I have long used a script to autosize a window to image size and I was
    > wondering how I might do the same thing with table size. It seems like
    > it should be as simple, but I don't know what I'm doing. Any
    > suggestions would be appreciated. Thanks.


    More information would be appreciated.

    http://www.physci.org/codes/sscce.jsp
     
    KC Wong, Feb 17, 2004
    #2
    1. Advertising

  3. Patrick wrote:

    > I have long used a script to autosize a window to image size and I was
    > wondering how I might do the same thing with table size. It seems like
    > it should be as simple, but I don't know what I'm doing. Any
    > suggestions would be appreciated. Thanks.


    An HTML table has no fixed size/width by default. One advantage
    of HTML is that content is not scaled down (e.g. like PDF documents)
    but flows according to the dimensions of the container box.

    You can use CSS to specify the minimum width for compliant UAs
    (min-width property, does not work in [recent] IEs) and you can
    use JavaScript to resize the popup window if its width is below
    that minimum width. For the height, you can resize the window
    as well.

    But keep in mind that many people dislike having their windows
    resized automatically. Just think of tabbed browsing, for example.
    window.open(...) may create a new Window object but will not create
    a new window. It will create a new tab in the current window
    instead, and if you resize that window, other documents displayed
    in other tabs of that window may become not as well legible.

    Allow scrollbars and/or an resizable popup window, that is the
    best you can do.


    PointedEars
     
    Thomas 'PointedEars' Lahn, Feb 23, 2004
    #3
    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. Dennis Strickland via .NET 247

    How to autosize the row heigth in a Datagrid

    Dennis Strickland via .NET 247, Jun 14, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    1,371
    Uri Dor
    Jun 15, 2004
  2. raymond chiu

    set autosize of datagrid to no

    raymond chiu, Dec 29, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    1,726
    Christopher Reed
    Dec 29, 2005
  3. Jeff

    newbie: autosize

    Jeff, Jul 14, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    1,873
  4. =?Utf-8?B?U0FM?=

    How do you autosize a Table Cell?

    =?Utf-8?B?U0FM?=, Aug 10, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    14,501
    John Timney \(MVP\)
    Aug 10, 2006
  5. Madame Blablavatsky
    Replies:
    8
    Views:
    182
    Dr John Stockton
    Sep 16, 2005
Loading...

Share This Page