Click here to Skip to main content
15,915,336 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
In javascript, ModalDialog.show() opens in IE but does not opens in other browser.

What I have tried:

In javascript, ModalDialog.show() opens in IE but does not opens in other browser.
Posted
Updated 18-Jun-16 4:29am

It's going to be a problem whatever you use.
There is the HTML DOM Dialog showModal() Method[^], which works on some browsers, so you may be able to work out somethign that works usign the two methods.
But to be honest modal dialogs in web pages just persuade me never to visit the site again...
 
Share this answer
 
Using this API is not a good idea, not even because it has poor browser compatibility, but because this is the feature removed from Web standards: Window.showModalDialog() — Web APIs.

In my article, I explained more reasonable alternatives you may have and some rationale behind: Modal Popup From Scratch.

I explained how to do things from scratch, but the most usual approach is using jQuery UI with jQuery plug-ins, 3rd-party ones (collectively known under the name "modal popup") of jQuery UI Dialog:
Dialog | jQuery UI,
Modal Popup.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900