showModalDialog -------------------------------------------------------------------------------- Description Creates a dialog box and displays in it the HTML document given by URL. The dialog box is a special window that is modal, meaning it retains the input focus until the user closes it. Syntax variant = object.showModalDialog(sURL [, vArguments [, sFeatures]]) Parameter Description sURL String specifying the URL of the document to load and display. While an empty string is accepted (""), it should be noted that this is useless since once a modal dialog has been opened, it cannot be accessed by the page that opened it. vArguments Optional. Variant specifying the arguments to use when displaying the document. This parameter can be used to pass a value of any type including an array of values. The dialog can extract the values passed by the caller from the dialogArguments property of the window object. sFeatures Optional. String specifying the window ornaments for the dialog box. It can be a combination of the following values. Syntax Description dialogWidth:number Sets the width of the dialog window. dialogHeight:number Sets the height of the dialog window. dialogTop:number Sets the top position of the dialog window relative to the upper-left corner of the desktop. dialogLeft:number Sets the left position of the dialog window relative to the upper-left corner of the desktop. center:{yes | no | 1 | 0 } Specifies whether to center the dialog window within the desktop. Default is yes. Return Value Returns a number, string, or other value. This is equal to the value of the returnValue property as set by the document given by URL. Remarks The default font settings should be set in the same way CSS attributes are set; for example, "font:3;font-size:4". To define multiple font values, use multiple font attributes. When dialogLeft and/or dialogTop is specified, the feature center is overridden, even though the default for center is yes. Applies To window ------------------------------------ dialogHeight -------------------------------------------------------------------------------- Description Returns the height of the dialog window. Syntax object.dialogHeight[ = dialogHeight] Remarks This property applies only to windows created using the showModalDialog method. This property has read-write permissions, meaning you can change as well as retrieve its current value. Applies To window dialogWidth -------------------------------------------------------------------------------- Description Returns the width of the dialog window. Syntax object.dialogWidth[ = dialogWidth] Remarks This property applies only to windows created using the showModalDialog method. This property has read-write permissions, meaning you can change as well as retrieve its current value. Applies To window -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- dialogLeft -------------------------------------------------------------------------------- Description Returns the left coordinate of the dialog window. Syntax object.dialogLeft[ = dialogLeft] Remarks This property applies only to windows created using the showModalDialog method. This property has read-write permissions, meaning you can change as well as retrieve its current value. Applies To window -------------------------------------------- dialogTop -------------------------------------------------------------------------------- Description Returns the top coordinate of the dialog window. Syntax object.dialogTop[ = dialogTop] Remarks This property applies only to windows created using the showModalDialog method. This property has read-write permissions, meaning you can change as well as retrieve its current value. Applies To window -------------------------------------------------------------------------------- open -------------------------------------------------------------------------------- Description Opens a stream to collect the output of write or writeln methods. Syntax document.open(mimeType, replace) Parameter Description mimeType Currently supports "text/html" only. replace Optional. String ("replace") indicating whether you want the new document you are writing to replace the current document in the History list. Otherwise, by default, the document you are creating will not replace the current document in the History list. Return Value No return value. Remarks The following example replaces the document with the new document. document.open("text/html", "replace") Applies To document Events onbeforeunload -------------------------------------------------------------------------------- open -------------------------------------------------------------------------------- Description Opens a new window and loads the document given by URL, or a blank document if a URL is not provided. Syntax window = object.open([URL [, name [, features [, replace]]]]) Parameter Description URL String specifying the URL of the document to display. If no URL is specified, a new window with about:blank will be displayed. name Optional. String specifying the name of the window. This name is used for TARGET on a FORM or an A. features Optional. String specifying the window ornaments to display. The following table lists the supported features. Syntax Description fullscreen={ yes | no | 1 | 0 } Specifies whether to display the browser in a full-screen or normal window. Default is no. Use full-screen mode carefully. Because this mode hides the browser's title bar and menus, you should always provide a button or other visual clue to help the user close the window. ALT+F4 will also close the new window. channelmode={ yes | no | 1 | 0 } Specifies whether to display the window in theater mode and show the channel band. toolbar={ yes | no | 1 | 0 } Specifies whether to display the browser toolbar, making buttons such as Back, Forward, and Stop available. location= { yes | no | 1 | 0 } Specifies whether to display the input field for entering URLs directly into the browser. directories = { yes | no | 1 | 0 } Specifies whether to add directory buttons. Default is no. status={ yes | no | 1 | 0 } Specifies whether to add a status bar at the bottom of the window. Default is yes. menubar={ yes | no | 1 | 0} Specifies whether to display the menu bar. Default is yes. scrollbars={ yes | no | 1 | 0} Specifies whether to display horizontal and vertical scroll bars. Default is yes. resizable={ yes | no | 1 | 0} Specifies whether to display resize handles at the corners of the window. width=number Sets the width of the window, in pixels. Minimum value should be 100. height=number Specifies the height of the window, in pixels. Minimum value should be 100. top=number Specifies the top position, in pixels. This value is relative to the upper-left corner of the screen. left=number Specifies the left position, in pixels. This value is relative to the upper-left corner of the screen. replace Optional. A boolean value specifying whether the URL that is loaded into the new page should create a new entry in the window's browsing history or replace the current entry in the browsing history. If true, no new history entry is created. Return Value Returns a reference to the new window. Use this reference to script properties and methods on the new window. Remarks A name for the new window can be used as a target for a form or an A element. By default, the open() method creates a window that has a default width and height and the standard menu, toolbar, and other features of Internet Explorer. You can alter this set of features by using the features parameter. This parameter is a string consisting of one or more feature settings. The replace parameter controls whether the new window is put into the browser history list. For example, the following creates a new window that contains Sample.htm. The new window is 200 by 400 pixels, has a status bar, but does not have a toolbar, menu bar, or address field. window.open("sample.htm",null, "height=200,width=400,status=yes,toolbar=no,menubar=no,location=no"); Applies To window -------------------------------------------------------------------------------- name -------------------------------------------------------------------------------- Description Specifies the name of a window or the frame so it can be targeted from links in other documents. Syntax object.name[ = sName] Settings This read/write property takes either a window name or frame name, or one of these special values: window_name A string that specifies a frame. _blank Loads the link into a new, unnamed window. _parent Loads the link over the parent. If the frame has no parent, this refers to _self. _self Replaces the page with the specified link. _top Loads the link at the topmost level. Remarks An exception to the rule, the window keyword must be used to access the name property. Examples The following code shows the name property being assigned to the window object. window.name="MyWindow"; The name property on the window frequently comes from the FRAME definition. parent.frames[0].name="Left"; The NAME attribute for a window can only be persisted in HTML when defined in a frame within a frameset. The name property can be assigned using the window open method. window.open("file.htm","Frame1"); Applies To FRAME, IFRAME, window --------------------------------------------------------------------------------