Forum Moderators: open
I have a page on my client's site that by all technicality has 3 different "forms" on it.
The first form collects a text box, id #, name, and date with of course a submit button. This takes you to another page.
The second "form" is just a button which collects the id # and gets you to another page (not same as the the first form).
The last "form" again is jsut a button that collects the id # and gets you to another page (not same as either before it).
My question is this. On the last two forms, I realized I need the information from the text box, name and date also. Is it possible to pass the information from form1 to form2 and form3 when you click the submit button for either of the last two "forms"?
I hope I am explaining this clearly enough :)
<form method="get" name="aForm">
Name<input type="text" name="name" /><br />
ID<input type="text" name="id" /><br/>
<input type="button" onClick="document.aForm.action = 'one.html'; aForm.submit();" value="One" />
<input type="button" onClick="document.aForm.action = 'two.html'; aForm.submit();" value="Two" />
<input type="button" onClick="document.aForm.action = 'three.html'; aForm.submit();" value="Three" />
</form>
Take notice of the onClick attributes. I set the forms action attribute to where I want to submit the form to and that I call the submit method to actually submit the form.