niutech / showModalDialog

window.showModalDialog polyfill using a <dialog> element
https://niutech.github.io/showModalDialog/demo.html
Apache License 2.0
177 stars 88 forks source link

Closing the Modal through button click #22

Closed VanishreeKS closed 8 years ago

VanishreeKS commented 8 years ago

I have to close the Modal Dialog from the button click event present in the page loaded in the IFrame. How do I do this. I have used your code for ShowModalDialog. Everything works fine in IE, however in chrome I am unable to pass the value selected to parent window from ShowModalDialog and close the window through close button. Kindly help.

niutech commented 8 years ago

See issue #5. You can pass back the value setting window.returnValue in the modal page, provided that they are in the same domain.