How to close the pop up window of modal dialog?
I am using modal dialog to validate server credentials. After clicking on submit button it开发者_如何学Python pops up new window. Further i want call a servel. But its get called in the same pop up window. I want to call it in the parent window by closing the pop up window. How to achieve this?
// opening new window
var myWindow = window.open(...);
// when you want to close it
myWindow.close();
If you want to close the popup window in JS executed on this new window's content it's even easier:
window.close()
精彩评论