By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,487 Members | 1,090 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,487 IT Pros & Developers. It's quick & easy.

Any way to make an auto-sizing window?

P: n/a
I was wondering if there was a portable way to make a popup window that
autosizes to the content (or a specific div within the content).

I have some dialogs that would look nicer in a "proper" fitting window.
But if I hard code the dimensions, then that doesn't take in to account
the different browsers and such, nor any variations in font size.

So, I was hoping through perhaps some clever java script there might be
a way do this.

Thanx!

Best Regards,

Will Hartung
Jan 16 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On Tue, 16 Jan 2007 06:55:51 GMT, Will Hartung <re******@sbcglobal.net>
wrote:
>I was wondering if there was a portable way to make a popup window that
autosizes to the content (or a specific div within the content).
Don't do that. Pop up adds do that, and people pay real money to stop
them. If you don't want people to pay money to other people to stop you
just don't start.
>I have some dialogs that would look nicer in a "proper" fitting window.
But if I hard code the dimensions, then that doesn't take in to account
the different browsers and such, nor any variations in font size.
Rethink your design.

Jan 16 '07 #2

P: n/a

Ed Seedhouse wrote:
Don't do that. Pop up adds do that, and people pay real money to stop
them. If you don't want people to pay money to other people to stop you
just don't start.
You're on form with the soundbites today Ed! 8-)

I liked the "1950s TV" analogy too

Jan 16 '07 #3

P: n/a
Rik
Will Hartung wrote:
I was wondering if there was a portable way to make a popup window
that autosizes to the content (or a specific div within the content).

I have some dialogs that would look nicer in a "proper" fitting
window. But if I hard code the dimensions, then that doesn't take in
to account the different browsers and such, nor any variations in
font size.

So, I was hoping through perhaps some clever java script there might
be a way do this.
If you want to do this, depending on the actual need of your site, you
might benefit from using an 'inline' popup instead of opening a new browser
window. Like with a absolute positioned <div>, or possibly an iframe
because of some form-control bugs with the former. Also, if you use an
iframe, resizing that frame with javascript from the 'child-page' is fairly
easy.
--
Rik Wasmus
Jan 16 '07 #4

P: n/a
On 16 Jan 2007 07:01:33 -0800, "Andy Dingley" <di*****@codesmiths.com>
wrote:
>You're on form with the soundbites today Ed! 8-)

I liked the "1950s TV" analogy too
I've got a few stored up, just waiting for an opportunity...

Jan 17 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.