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

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
News Flash: Adobe Has iPhone Workaround
Adobe's Flash 10.1 Goes Mobile (Minus iPhone)
A Salute to Visionary CEOs

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, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Building a Banking Application Home Page with OOP · Mixing Scripting Languages · Review: phpFox, a Social Networking CMS with all the Bells and Whistles
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Enterprise 2.0: Social Networking in the Cloud · BroadSoft Marketplace Hastens Pace of Telephony Innovation · Review: HTC Hero for Sprint