Shuttleu
2010-11-06 21:21:43
right i needed to split a form up into 6 parts (i have my reasons)
this is how it is split

now my problem is that when i hit the submit button i need it to submit forms 2, 4 & 6
i made this
it works ok, apart from only every other field gets submitted
so if i have 4 text fields then text field 1 & 3 will be submitted, but 2 & 4 wont
does anyone know why every other field is submitted and not every field?
thanks in advance
~shut
EDIT: the code i am using to submit it is
this is how it is split

now my problem is that when i hit the submit button i need it to submit forms 2, 4 & 6
i made this
<script type="text/javascript">
function submitFormsById(arFormsSubmit)
{
var formCollector = document.createElement("form");
with(formCollector)
{
method = "post";
action = "formfilled.php";
name = "formCollector";
id = "formCollector";
style.display = "none";
}
for(var ix = 0; ix<arFormsSubmit.length; ix++)
formCollector=appendFormVals2Form(document.getElementById(arFormsSubmit[ix]), formCollector);
document.body.appendChild(formCollector);
formCollector.submit();
}
function appendFormVals2Form(frmCollectFrom, frmCollector) {
var frm = frmCollectFrom.elements;
for(var ix = 0 ; ix < frm.length ; ix++)
frmCollector.appendChild(frm[ix]);
return frmCollector;
}
</script>it works ok, apart from only every other field gets submitted
so if i have 4 text fields then text field 1 & 3 will be submitted, but 2 & 4 wont
does anyone know why every other field is submitted and not every field?
thanks in advance
~shut
EDIT: the code i am using to submit it is
<input type="button" Value="go" onclick="submitFormsById(Array('form1','form2','form3','form4'))"/>