rjusa
11-05-2003, 08:33 AM
Here's my dilema...In my parent form I open a child window, input the relevant field info, click "Upodate" and voila the child closes and the info is put into the parent...neat! Not so neat, however, is that when I finish filling out the rest of the parent form and click "Continue" it works just fine in Netscape but NOTHING happens in IE...its like somehow things (required fields checker, Submit) have been shut off...in the following code from the child window, do I have to somehow "turn" the parent back "on"? How would this be done?
<script LANGUAGE="JavaScript"><!--
function updateParent(childForm2) {
if (childForm2.cf2a[0].checked == childForm2.cf2a[1].checked) {
alert("Irrevocable Y/N is required")
return false
}
if (childForm2.cf2b.value == "") {
alert("First Name is required")
childForm2.cf2b.focus()
return false
}
if (childForm2.cf2c.value == ""){
alert("Last Name is required")
childForm2.cf2c.focus();
return false
}
if (childForm2.cf2d.value == "") {
alert("Relationship is required")
childForm2.cf2d.focus();
return false
}
opener.document.parentForm.CndnCFBFirstName.value = document.childForm2.cf2b.value;
opener.document.parentForm.CndnCFBLastName.value = document.childForm2.cf2c.value;
opener.document.parentForm.CndnCFBRel.value = document.childForm2.cf2d.value;
opener.document.parentForm.CndnCFBpc.value = document.childForm2.cf2f.value;
opener.document.parentForm.CndnCFBSS.value = document.childForm2.cf2e.value;
if (document.childForm2.cf2a[0].checked)
opener.document.parentForm.CndnCFBIrr[0].checked=true;
if (document.childForm2.cf2a[1].checked)
opener.document.parentForm.CndnCFBIrr[1].checked=true;
self.close();
return false;
}
//--></SCRIPT>
<form name="childForm2" onSubmit="return updateParent(this);">
<script LANGUAGE="JavaScript"><!--
function updateParent(childForm2) {
if (childForm2.cf2a[0].checked == childForm2.cf2a[1].checked) {
alert("Irrevocable Y/N is required")
return false
}
if (childForm2.cf2b.value == "") {
alert("First Name is required")
childForm2.cf2b.focus()
return false
}
if (childForm2.cf2c.value == ""){
alert("Last Name is required")
childForm2.cf2c.focus();
return false
}
if (childForm2.cf2d.value == "") {
alert("Relationship is required")
childForm2.cf2d.focus();
return false
}
opener.document.parentForm.CndnCFBFirstName.value = document.childForm2.cf2b.value;
opener.document.parentForm.CndnCFBLastName.value = document.childForm2.cf2c.value;
opener.document.parentForm.CndnCFBRel.value = document.childForm2.cf2d.value;
opener.document.parentForm.CndnCFBpc.value = document.childForm2.cf2f.value;
opener.document.parentForm.CndnCFBSS.value = document.childForm2.cf2e.value;
if (document.childForm2.cf2a[0].checked)
opener.document.parentForm.CndnCFBIrr[0].checked=true;
if (document.childForm2.cf2a[1].checked)
opener.document.parentForm.CndnCFBIrr[1].checked=true;
self.close();
return false;
}
//--></SCRIPT>
<form name="childForm2" onSubmit="return updateParent(this);">