[Javascript] Is it possible to use Javascript to submitoncefortwo different forms?

John Warner john at jwarner.com
Tue Aug 15 08:11:44 CDT 2006


Well you can't do it the way you want I suspect. But you can get tricky
and cause it to happen. If it were me I would handle this on the server
side, but if you need to go to two different servers, consider using a
hidden frame. You form's submit event triggers a JavaScript function
that copies the form data to a hidden frame's form and then trigger the
frame submit and your form submit. Not pretty, but should get the job
done. Still IMO this is best handled on the server side.

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:46 PM
> To: [JavaScript List]
> Subject: RE: [Javascript] Is it possible to use Javascript to 
> submitoncefortwo different forms?
> 
> 
> 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