Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Netscape: Target form field in window.opener

Status
Not open for further replies.

pha2er

Programmer
Dec 4, 2001
16
GB
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top