spacer
Yehuda Shiran August 17, 2001
The Dialog Box's Size
Tips: August 2001

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
Microsoft Shows Off Silverlight 4, IE9 Plans
Metasploit Expands Vulnerability Test Framework
HyperCard Reborn?

The dialogHeight parameter sets the height of the dialog window. Try opening a window without specifying its height. A default size window opens. Now, open a window 200 pixels high. Here is the function call:

window.showModalDialog('010817.html','','dialogHeight:200px');
Since the default unit of measure for physical dimensions is not consistent between different versions of Internet Explorer, it is safer to always specify the units. You can use absolute units (cm, mm, in, pt, pc, or px) or relative units (em or ex). You cannot specify a very small window height. The minimum is 100px.

Let's play with the window's width now. To open a window 800 pixels wide and 200 pixels high (try it), you would go:

window.showModalDialog('010817.html','','dialogHeight:200px;dialogWidth:800px');
For more on modal and modeless dialog boxes, go to Column 90, Modal and Modeless Dialog Boxes.


People who read this tip also read these tips:

Look for similar tips by subject:

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Rolling Out Your Own HTML Application Version Control · HTML 5: Client-side Storage · Working with Ajax Server Extensions
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Wi-Fi Product Watch, November 2009 · Chip Market Recovering From '08 Collapse · Low-Cost Tools to Kickstart Your New Business