What does window showModalDialog return?

The showModalDialog method does not return until the modal dialog is closed. With the returnValue property, the value returned by the showModalDialog method can be retrieved. This property facilitates the communication between the opener and the dialog window.

How do I pop up a window?


  1. A popup can be opened by the open(url, name, params) call.
  2. Browsers block open calls from the code outside of user actions.
  3. Browsers open a new tab by default, but if sizes are provided, then it’ll be a popup window.
  4. The popup may access the opener window using the window.

What is the replacement for showModalDialog?

There is no real replacement for showModalDialog.

How do I open a pop-up in JavaScript?

The syntax to open a popup is: window. open(url, name, params) : url. An URL to load into the new window.

What is popup in JavaScript?

In Javascript, popup boxes are used to display the message or notification to the user. There are three types of pop-up boxes in JavaScript namely Alert Box, Confirm Box, and Prompt Box. Alert Box: It is used when a warning message is needed to be produced.

Is showmodaldialog () standard in HTML5?

Try out showModalDialog (). showModalDialog () was briefly standardized as part of HTML5. The third argument for additional options was not present in the HTML5 version. Non-standard. Check cross-browser support before using.

Is there a replacement for showmodaldialog?

Show activity on this post. There is no real replacement for showModalDialog. You could use window.open to open the dialog subpage and then use the window.opener to update the controls on the parent page. This would not work in the client javascript when waiting for a result value from the dialog subpage.

What is the use of window showmodaldialog?

The Window.showModalDialog() creates and displays a modal dialog box containing a specified HTML document.

Is there a replacement for showmodaldialog in Salesforce?

Hi if your concern is that u can edit the parent window even after opening the popup (Which was not the case with showModalDialog ), then u can use code something like this using window.open () Show activity on this post. There is no real replacement for showModalDialog.