- What is the replacement for showModalDialog?
- Why is showModalDialog deprecated?
- When not to use a modal?
- What's the difference between modal and dialog?
What is the replacement for showModalDialog?
There is no real replacement for showModalDialog. You could use window. open to open the dialog subpage and then use the window.
Why is showModalDialog deprecated?
showModalDialog() is depreciated precisely because it pauses javascript execution. Pausing javascript execution is difficult to implement securely, and in a way the gives a responsive browser. This is similar to why synchronous XMLHttpRequest is also being depreciated.
When not to use a modal?
5. Do not use modal dialogs for nonessential information that is not related to the current user flow. As discussed above, modal dialogs have numerous disadvantages and costs to users. In order for these costs to be justified, their relevance to the task and importance should be high.
What's the difference between modal and dialog?
For example, you could have a dialogue containing a contact form or some text to confirm an action. Dialogues can be included in a modal. This would mean that the modal prevents interaction with the page while the dialogue provides a means to dismiss the dialogue and modal once interacted with.