dialogLeft property

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
This topic has not yet been rated - Rate this topic

Sets or gets the left coordinate of the modal dialog window.

Syntax

JavaScript

p = object.dialogLeft

Property values

Type: Variant

the left coordinate of the dialog window.

Remarks

The dialogLeft property applies only to windows that are created by using the showModalDialog method and the showModelessDialog method.

When a script calls the showModalDialog method, it suspends execution until the modal dialog box is closed. As a result, the script cannot use the dialogLeft property to change the appearance of the modal dialog box. To control the appearance of the modal dialog box, use script in the file loaded by the sURL parameter or use the value of the sFeatures parameter to specify the desired settings.

The default unit of measure for dialogLeft in Microsoft Internet Explorer 4.0 is the em; in Microsoft Internet Explorer 5 it is the pixel. The value can be an integer or floating-point number, followed by an absolute units designator (cm, mm, in, pt, or pc), or a relative units designator (em, ex, or px). For consistent results, specify the dialogLeft in pixels when you design modal dialog boxes.

Examples

This example creates a dialog window that uses the dialogLeft property to set the position relative to the left side of the screen. Do not break the script code into two lines as in the fourth line of the example. This was done for readability only.

Code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/dialogLeft.htm


<SCRIPT>
function someMessage()
{
    event.srcElement.blur();
    window.showModalDialog("message.htm", "",
        "dialogWidth:5cm; dialogHeight:10cm; 
        dialogTop:0cm; dialogLeft:0cm")
}
</SCRIPT> 
</HEAD>
<BODY>
<SELECT onchange="someMessage()">
    <OPTION>Item 1</OPTION>
    <OPTION>Item 2</OPTION>
    <OPTION>Item 3</OPTION>
</SELECT>

See also

window

 

 

Send comments about this topic to Microsoft

Build date: 11/27/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

© 2013 Microsoft. All rights reserved.