[Javascript] Is it possible to use Javascript to submit oncefortwo different forms?

Terry Riegel riegel at clearimageonline.com
Tue Aug 15 06:37:10 CDT 2006


Roland,

Try this.

<form method="post" action="processor1.jsp" name="form1"  target="new">
   <input type="text" name="var">
</form>
<form method="post" action="processor2.jsp" name="form2">
   <input type="text" name="var1">
</form>
<input type="button" name="mybutton" value="Send Em Both Along"  
onClick="document.form2.submit();document.form1.submit();">


Terry



On Aug 14, 2006, at 6:45 PM, Dong, Roland wrote:

> Thanks. John.  Can you throw more light on this?
>
>  -----Original Message-----
> From: 	John Warner [mailto:john at jwarner.com]
> Sent:	Monday, August 14, 2006 06:37 PM Eastern Standard Time
> To:	'[JavaScript List]'
> Subject:	RE: [Javascript] Is it possible to use Javascript to  
> submit oncefortwo different forms?
>
> Yes.
>
> John Warner
>
>
>> -----Original Message-----
>> From: javascript-bounces at LaTech.edu
>> [mailto:javascript-bounces at LaTech.edu] On Behalf Of Dong, Roland
>> Sent: Monday, August 14, 2006 6:04 PM
>> To: [JavaScript List]
>> Subject: [Javascript] Is it possible to use Javascript to
>> submit once fortwo different forms?
>>
>>
>>
>> I have two forms in a single jsp which should be submitted to
>> different actions.
>>
>> Example:
>>
>> <form method=post action="processor1.jsp">
>> ......
>>
>> </form>
>>
>> <form method=post action="processor2.jsp">
>>
>> .......
>> </form>
>>
>>  Is it possible to click sumbit button and have both forms
>> submitted to different actions?
>>
>> Thanks,
>>
>> Roland
>
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
>
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript




More information about the Javascript mailing list