|
I hope this will help you. I have a page with 6 forms on it
and I submit them all with one button using the following script
I have included part of my HTML code that shows six forms
where I enter data and the seventh form combines all of them
and is submitted. Please note where I placed the submit button.
the seventh form contains all hidden inputs with all the
fields that are on the other six forms.
Hope this is what you need.
<head>
<SCRIPT LANGUAGE="JavaScript">
function copydata()
{
document.formg.text_one.value = document.forma.text_one.value;
document.formg.a_type.value = document.forma.a_type.value;
document.formg.rq_name.value = document.forma.rq_name.value;
document.formg.fl_name.value = document.forma.fl_name.value;
document.formg.emp_stat.value = document.forma.emp_stat.value;
document.formg.emp_id.value = document.forma.emp_id.value;
document.formg.bus_unit.value = document.forma.bus_unit.value;
document.formg.dpt.value = document.forma.dpt.value;
document.formg.brfr.value = document.forma.brfr.value;
document.formg.tt.value = document.forma.tt.value;
document.formg.text_two.value = document.formb.text_two.value;
document.formg.text_three.value = document.formc.text_three.value;
document.formg.text_four.value = document.formd.text_four.value;
document.formg.text_five.value = document.forme.text_five.value;
document.formg.text_six.value = document.formf.text_six.value;
document.formg.oa_0.value = document.formf.oa_0.value;
document.formg.submit();
return false;
}
</SCRIPT>
</head>
<form name='forma' onSubmit='return copydata()'>
<form name='formb' onSubmit='return copydata()'>
<form name='formc' onSubmit='return copydata()'>
<form name='formd' onSubmit='return copydata()'>
<form name='forme' onSubmit='return copydata()'>
<form name='formf' onSubmit='return copydata()'>
<input type='submit'>
<form name="formg" action="yourpage.php" method="post">
<input type="hidden" name="text_one">
<input type="hidden" name="text_two">
<input type="hidden" name="text_three">
<input type="hidden" name="text_four">
<input type="hidden" name="text_five">
<input type="hidden" name="text_six">
<input type="hidden" name="a_type">
<input type="hidden" name="rq_name">
<input type="hidden" name="fl_name">
<input type="hidden" name="emp_stat">
<input type="hidden" name="emp_id">
<input type="hidden" name="bus_unit">
<input type="hidden" name="dpt">
<input type="hidden" name="brfr">
<input type="hidden" name="tt">
<input type="hidden" name="oa_0">
</form>
__________________
Beyond a critical point within a finite space, freedom diminishes as numbers increase. ...The human question is not how many can possibly survive within the system, but what kind of existence is possible for those who do survive."
|