Javascript implementation Modal Dialog Box

Source: Internet
Author: User

First, let's talk about the dialog box.
Dialog box is widely used in Windows applications. Many application settings are required for interaction with users.
The dialog box is used. Therefore, the dialog box is one of the most important interface elements in Windows applications,
It is an important means of interaction with users. A dialog box is a special window, any operation on the window (
Such as moving, maximizing, and minimizing) can also be implemented in the dialog box.

The dialog box can be roughly divided into the following two types.

(1) Modal Dialog Box: After the modal dialog box is displayed, the system resources are exclusive and the user can only close the dialog box.
The other part of the application code cannot be executed before the dialog box is closed.
The modal dialog box generally requires you to make a selection.

(2) Non-Modal Dialog Box: after the non-modal dialog box is displayed, the program can not close this dialog box
Continue to execute. You do not need to respond to code transferred to other parts of the application. Non-modulo
The Status dialog box is generally used to display information or perform some settings in real time.

Modal windows are common in traditional programming languages. Simply put, if they are modal windows
Child Window. If the child window is not closed, the parent window cannot be operated.
, And does not return to the original program until the modal window is closed.

The non-modal mode is displayed directly, and then the original program continues to execute the following statement, and other windows
The port is also available.

A Modal Dialog Box excludes user input. When a modal dialog box is opened, you can only
Other user interface objects cannot receive input information. Most of the dialogs used by the application
All are modal dialogs.
In a browser, a new window popped up by windwo. Open or hyperlink is a non-mode window, while a mode window is
A window similar to alert that must be closed to respond to other events.

Understand the modal and non-modal of the dialog box.

In the development of B/S structure applications, sometimes we want the user to enable
Child Window in front of the original window,
In IE, we can use
The window. showmodelessdialog () method is used to create a non-modal dialog box that displays HTML content.
The window. showmodaldialog () method is used to create a modal dialog box that displays HTML content.
Is a dialog box, so it does not have all the properties of the window opened with window. open.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.