showModalDialog icon indicating copy to clipboard operation
showModalDialog copied to clipboard

Unable to close the popup on close button

Open RitaPatil08 opened this issue 4 years ago • 2 comments

when we add a cancel button no code is working to close the popup. please provide any solution on this.

RitaPatil08 avatar Jan 22 '21 07:01 RitaPatil08

Assuming you were trying to do something like, Response.Write("<script language='javascript'>window.close();</script>"); don't use ~~window.close();~~ and instead use parent.document.getElementsByTagName('dialog')[0].close(); as stated at the bottom of the README

ilyabodo avatar Jun 15 '21 15:06 ilyabodo

parent.document.getElementsByTagName('dialog')[0].close(); does not work for me.... I get: Cannot read properties of undefined (reading 'close')

krm0503 avatar Mar 19 '24 02:03 krm0503