Click to See Complete Forum and Search --> : Returning from child/parent, "Submit" doesn't work


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);">

rjusa
11-05-2003, 09:09 AM
I don't know how many people answer their own question but I'd thought I'd share my solution. In the whole scheme of things the process begins with a Due Dilligence form and after completed takes you to the application form, what I have called the parent. Instead of naming the parent form <form name="parentForm> I opted to use the reference 'forms[0]' anywhere I had coded parentForm, both in the child and parent. Well, lo and behold the creature now works now both under Netscape and IE! Ain't sure exactly why, have some vague ideas... having been up till 1AM playing with this beast, I'm happy. Hope this helps anyone who runs into this problem in IE.

Thanks,
Ron