WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 Auto resizing windows, Guillermo, March 4, 2004
     Re:Auto resizing windows , iDRiS, March 5, 2004
     Re:Auto resizing windows, Erik Arvidsson, March 5, 2004
         Re:Auto resizing windows < I think I got it!, Guillermo, March 5, 2004
             Re:Auto resizing windows < I think I got it!, Guillermo, March 5, 2004
                 Re:Auto resizing windows < I think I got it!, Guillermo, March 5, 2004
         Re:Auto resizing windows, Guillermo, March 5, 2004

Subject: Re:Auto resizing windows < I think I got it! From: Guillermo Date: March 5, 2004


 function Resize() {
       iHeight = document.documentElement.scrollHeight + 30;
       // if iHeight > 550
       // iHeight = 550
       window.resizeTo(420, iHeight);
       }

The + 30 there is just so theres a bottom margin. Now I need help with the If... condition...

 


 

From: Guillermo
Sent: March 5, 2004
Subject: Re:Auto resizing windows < I think I got it!

 function Resize() {
       iHeight = document.documentElement.scrollHeight;
       window.resizeTo(420, iHeight);
     }

Now I need some help with the max height allowed. If the heigth is larger than, say, 550, the window height should be 550 and display scrollbars. If it's not, scrollbars shouldn't come up.

From: Erik Arvidsson
Sent: March 4, 2004
Subject: Re:Auto resizing windows

Just use scroll height.

erik

This is a bit tricky, but what I want to do is create a browser popup that automatically resizes (height only) to the height of the content. For instance, let's say I have a page with 5 lines of text and another one with 30. The window should automatically resize in order to display all the contents without showing scrollbars.
Here's the tricky part. If the height is larger than a specified value (400 px), scrollbars should come up, as this would be the max height allowed.
I want this because the contents of the popup are dynamic.
Thanks!






Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX