How do I close a form opened with window.showModalDialog?
Posted on 2013-11-06
I've opened a form with:
newWindow = window.showModalDialog("\\Test1.asp")
In Test1.asp, I have a "close" hyperlink:
When I click on the hyperlink it opens the same form in another another browser and displays the error message:
"The webpage you are viewing is trying to close the window
Do you want to close this window?""
If I open the form with:
newWindow = window.open("\\Test1.asp;
then Test1.asp closes ok.
I need to only open 1 instance of this form so how do I close a form opened with window.showModalDialog?
If it's not possible then is there a better method?