View Full Version : Submiting two forms with one button
leesco
12-06-2002, 05:58 PM
Is there a way to submit the data in two forms when the submit button is hit in one form? Example: the info in form a is always submited when the submit button in form b or c is pressed.
Thanks
Roy Sinclair
12-06-2002, 06:18 PM
<form name="a">
...
</form>
<form name="b">
...
<input type="submit" onclick="document.forms['a'].submit();return true;">
...
</form>
This should do it.
leesco
12-06-2002, 06:54 PM
I tried the code, but when I tested it, it was still only sending me the info from the form which contained the submit button. Any idea what I could have done wrong or what I might have misconfiged.
Roy Sinclair
12-06-2002, 09:17 PM
To help you further I would need to see at least the relevant parts of your code.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.