Forum Moderators: open
for(var i=0; i < myinputs.length ; i++){
if(myinputs[i].getAttribute("value") == "Open"){
myinputs[i].onclick = function() {
myWindow = window.open('','','width=400,height=200');
myid = document.getElementById("msg");
myid.childNodes[0].nodeValue = "Window is open.";
}
}
if(myinputs[i].getAttribute("value") == "Close") {
myinputs[i].onclick = function() {
if (myWindow){//<<<<is this the offending line?
myWindow.close();
myid = document.getElementById("msg");
myid.childNodes[0].nodeValue = "Window is closed.";
}
}
}
.
.
.
if(false == my_window.closed) in the offending line but FF still refuses to close the window. My research tells me that only a window that was opened by the code may be closed by the code and that is what I am doing, right? The msg "Window is closed." is displayed but the window is still displayed only in FF?