Click to See Complete Forum and Search --> : opener.closed is null or not an object


sash
06-24-2004, 04:23 AM
Am new to Java Script, please help

This is the code:

function goForit() {
var location;
var password;
password=this.document.testform.inputbox.value
location=password + ".html"
fetch(location)
theKeeper=window.close()
}
function fetch(location) {
var root;
if (opener.closed) {
root=window.open
('','theKeepersGopher','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes ,copyhistory=no');
root.location.href = location;
} else {
opener.location.href = location; }
}
And I get this error: opener.closed is null or not an object

gil davis
06-24-2004, 06:05 AM
if (opener) {
if (opener.closed) {
...
}
}