spacer
Yehuda Shiran August 16, 2001
The Dialog Box' Syntax
Tips: August 2001

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
Google Chrome Playing Catch-Up on Extensions
Open Solutions Alliance Gets New Leadership
Red Hat Spacewalk Expands Linux Management
The syntax of showModalDialog() is as follows:

vReturnValue = window.showModalDialog(sURL [, vFreeArgument] [, sOrnaments]);
The syntax of showModelessDialog() is identical:

vReturnValue = window.showModelessDialog(sURL [, vFreeArgument] [, sOrnaments]);
Here is a brief summary of the arguments:

  • vReturnValue. The function showModalDialog() returns the value of the returnValue property as set by the opened dialog window. The function showModelessDialog() returns the new window object.
  • vFreeArgument. You can use this optional parameter to pass a value of any type to the open dialog box. You can pass a scalar, a string, an array of values, an object, etc. You access this value in the new window by referring to the dialogArguments property of the new window object. You can access the dialogArguments property of the new window object, only when you call showModalDialog() or showModelessDialog() from a "trusted" application.
  • sOrnaments. You can use this optional parameter to specify the look of the new window. There are a dozen ornaments you can control. You need to concatenate the window's properties you want to alter in one string, separating them with semicolons. The dozen window's attributes are:
    • dialogHeight: sHeight
    • dialogLeft: sXpos
    • dialogTop: sYpos
    • dialogWidth: sWidth
    • center: ( yes | no | 1 | 0 | on | off )
    • dialogHide: ( yes | no | 1 | 0 | on | off )
    • edge: ( sunken | raised )
    • help: ( yes | no | 1 | 0 | on | off )
    • resizable: ( yes | no | 1 | 0 | on | off )
    • scroll: ( yes | no | 1 | 0 | on | off )
    • status: ( yes | no | 1 | 0 | on | off )
    • unadorned: ( yes | no | 1 | 0 | on | off )
    You can also add CSS (Cascading Style Sheets) attributes to the sOrnaments variable.


People who read this tip also read these tips:

Look for similar tips by subject:

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

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

webref The latest from WebReference.com Browse >
Administering MySQL Databases on the Web Using PHP · Popular JavaScript Framework Libraries: An Overview - Part 3 · Accessing Your MySQL Database from the Web with PHP
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
So what is an Oracle Nested Table? · E-Discovery Architectures 101 · eBay Embraces Big Sellers, Cyber Monday Trends