Hi there,
I have a piece of code which works perfectly well in IE, but when I try to run this in Netscape 7 I get an error "window.opener.form1 has no properties", here's the code:
function click_Select(id, UniName){
window.opener.form1.university.value = id;
window.opener.form1.UniversityName.value = UniName;
if (window.opener.form1.Qualification){
window.opener.form1.Qualification.value = '';
}
if (window.opener.form1.Course){
window.opener.form1.course.value = '';
window.opener.form1.CourseName.value = '';
}
setTimeout("window.close()", 10);
}
Basically it hits this line:
window.opener.form1.university.value = id;
And I get the error! I have no problems targeting the window.opener as I can run a test function from the opened window that simply alerts "working". Does anyone know why I can target a JS function, but not a form field?
Thanks,
Greg.
I have a piece of code which works perfectly well in IE, but when I try to run this in Netscape 7 I get an error "window.opener.form1 has no properties", here's the code:
function click_Select(id, UniName){
window.opener.form1.university.value = id;
window.opener.form1.UniversityName.value = UniName;
if (window.opener.form1.Qualification){
window.opener.form1.Qualification.value = '';
}
if (window.opener.form1.Course){
window.opener.form1.course.value = '';
window.opener.form1.CourseName.value = '';
}
setTimeout("window.close()", 10);
}
Basically it hits this line:
window.opener.form1.university.value = id;
And I get the error! I have no problems targeting the window.opener as I can run a test function from the opened window that simply alerts "working". Does anyone know why I can target a JS function, but not a form field?
Thanks,
Greg.