0
Window.open()

Is not returning the value

Like

Var retVal = Window.showModalDialog();

How to get it for the Chrome browser?

Lee Taylor
  • 7,761
  • 16
  • 33
  • 49
  • 1
    I remember `showModalDialog` is deprecated and you should avoid using it, most browsers removed it's functionality – Sasha Jan 10 '20 at 14:53
  • Per [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Window/showModalDialog): "This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it." –  Jan 10 '20 at 16:33
  • Does this answer your question? [Why is window.showModalDialog deprecated? What to use instead?](https://stackoverflow.com/questions/20733962/why-is-window-showmodaldialog-deprecated-what-to-use-instead) –  Jan 10 '20 at 16:36
  • Does this answer your question? [How can I make `showModalDialog` work in Chrome 37](https://stackoverflow.com/questions/25663053/how-can-i-make-window-showmodaldialog-work-in-chrome-37) –  Jan 10 '20 at 16:38
  • If i use window.open() it will not return value from chield window to parent. – Sagar Thakare Patil Jan 10 '20 at 18:28
  • @SagarThakarePatil That is correct. And? –  Jan 10 '20 at 18:40
  • I have to use that return value for my fields is there any alternative. Any suggestions. – Sagar Thakare Patil Jan 10 '20 at 18:57
  • `is there any alternative` I suppose you could take a look at the two links I found for you. –  Jan 10 '20 at 19:03
  • When i used Error: xhtml 1.0 transitional : Element Dialog is not supported. – Sagar Thakare Patil Jan 13 '20 at 06:45

1 Answers1

0

https://developer.mozilla.org/en-US/docs/Web/API/Window/showModalDialog

Of course, Window.showModalDialog is a JavaScript method unique to Internet Explorer, and no other browser supports this specific method.

If you don't consider the incompatibility of the method, you can use Window.open to override Window.showModalDialog instead.

Or refer to the link below, which mentions a compatible alternative.

https://github.com/niutech/showModalDialog

Lee Taylor
  • 7,761
  • 16
  • 33
  • 49
Yf D
  • 1