The Modal Dialog allows a page to display content to the user in a "modal" manner
which prevents the user from interacting with the rest of the page. Modal dialogs
do have many usability advantages, such as error prevention (the modal dialog is
always on top, so it can’t get lost or be ignored, and the user can’t accidentally
change the selection in the main window while working on a modal dialog that affects
that selection) and dialog closure (you’re requiredto proceed through the dialog
rather than switching to something else)
In the example below, if the person is a new user, he needs to sign up. As one clicks
on the Sign Up link, a modal pop-up opens which asks the user to register. The user
can register himself, without being redirected to another page for registration
and coming back to the login page.