August 14, 2001 - Creating A Modal Dialog Box | WebReference

August 14, 2001 - Creating A Modal Dialog Box

Yehuda Shiran August 14, 2001
Creating A Modal Dialog Box
Tips: August 2001

Yehuda Shiran, Ph.D.
Doc JavaScript

When creating a new window, Internet Explorer lets you generate two types of windows. The first type retains the input focus while open. The user cannot switch windows until the window is closed. This behavior is typical to dialog boxes which you need to close before continuing to other tasks. This kind of dialog box is referred to as a modal dialog box.

You create a modal dialog box with showModalDialog(). To show 010814.html in a modal dialog box, you would go:

window.showModalDialog("010814.html");
Click the following button to create a modal dialog box:

This button is defined as follows:

<INPUT TYPE="button" VALUE="Push To Create" onclick="fnOpenModal()">
The function fnOpenModal() is defined as:

function fnOpenModal(){
  window.showModalDialog("010814.html")
}