Sign up now to view this solution! It's quick, easy, and secure to subscribe. We will return you to this solution, unlocked, when you’re done.
How do you combine two forms before submitting them as one form?
<SCRIPT LANGUAGE="JavaScript"><!--
function copydata() {
document.formthree.mytextone.value = document.formone.mytextone.value;
document.formthree.mytexttwo.value = document.formtwo.mytexttwo.value;
document.formthree.submit();
return false;
}
//--></SCRIPT>
<FORM NAME="formone" onSubmit="return copydata()">
Enter some text: <INPUT TYPE="text" NAME="mytextone">
<P><INPUT TYPE="BUTTON" VALUE="Submit" onClick="copydata()">
</FORM>
<FORM NAME="formtwo" onSubmit="return copydata()">
Enter some text: <INPUT TYPE="text" NAME="mytexttwo">
<P><INPUT TYPE="BUTTON" VALUE="Submit" onClick="copydata()">
</FORM>
<FORM NAME="formthree">
<INPUT TYPE="HIDDEN" NAME="mytextone">
<INPUT TYPE="HIDDEN" NAME="mytexttwo">
</FORM>
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23:
Sign up now to view this solution! It's quick, easy, and secure to subscribe. We will return you to this solution, unlocked, when you’re done.
Posted on 2012-01-16 at 20:10:16ID: 37444864
All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.