Function OpenDialog ()
{
Var Left = Screen.width / 2 - 340/2;
Var Top = Screen.height / 2 - 350/2;
WINDOW.OPEN ('Dialog.html', 'Dialog', 'MODAL = 1, Left =' LEFT ', TOP =' TOP ', Height = 350, Width = 330, resizable = 0, status = 0 , scrollbars = 0 ');
}
Script>
HEAD>
Div>
Body>
HTML>
Note that modal = 1 in the Window.open parameter, this is to open a new window for modality, if modal = 0 is not modular. This parameter is not supported in IE6, no matter how you set it, it is always non-modal.
Test OK in Mozilla Firefox.
Also in IE we can use: Window.ShowModaldialog ('Dialog.html', Window, 'Status: No; DialogWidth: 460px; DialogHeight: 400px'); to display a modal dialog. In the same way, only IE support, other browsers, such as Mozilla, Netscape, are not supported.