I try to close child popup from a button on parent window. Below is the function used for it.But it doesn't work fine with IE, it works fine with firefox. Sometimes child popup gets closed on first time but when you reopen th开发者_如何学编程e popup and try to close it doesn't close. And generally it doesn't work at all.
If i debug by alerts then "!fenetreOuverteConf.closed" is false. But it's value is true with firefox.
function closePopup(){
var motherCOnf = (opener?opener:parent);
var fenetreOuverteCOnf = motherCOnf.window['childPopup'];
if(fenetreOuverteCOnf && !fenetreOuverteConf.closed)
{
fenetreOuverteCOnf.close();
}
}
It may be because you have fenetreOuverteCOnf
and fenetreOuverteConf
- note the difference in capitalization of the "o" in "conf". Javascript variables are cAsE sEnSiTiVe!
精彩评论