Did you miss my response? Much better than trying to handle the final submit yourself. Here it is again...
Try a Tapestry AJAX Form with two Submits: one visible and one hidden. Add JavaScript that listens to the click of the visible submit, stops the event propagating, does the call to the external service and, on success, sets the value of the form field (which might be a hidden field) and clicks the hidden submit. Here's a standard AJAX Form: T5.4: http://jumpstart.doublenegative.com.au/jumpstart7/examples/ajax/form T5.3: http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/form Here's some JavaScript that listens to something: T5.4: http://jumpstart.doublenegative.com.au/jumpstart7/examples/javascript/robust T5.3: http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/robust Geoff On 23 Jul 2014, at 11:43 pm, Shahid Shaikh <sshaikh1...@yahoo.com.INVALID> wrote: > Thank you for that clarification again. > > So just to be clear, once i have javascript handle the call to the external > url, and process the data. Once i do form.submit() in javascript, my > OnSubmitForm event in Tapestry will still get triggered? > > > > ________________________________ > From: Thiago H de Paula Figueiredo [via Apache Tapestry Mailing List > Archives] <ml-node+s1045711n5727697...@n5.nabble.com> > To: shahidsan <sshaikh1...@yahoo.com> > Sent: Wednesday, July 23, 2014 9:33 AM > Subject: Re: Tapestry AJAX call on submit > > > > On Tue, 22 Jul 2014 23:04:56 -0300, Shahid <[hidden email]> > wrote: > >> Sorry about the confusion and I appreciate your feedback . >> I would like to invoke the external URL as part of the onSubmit event. >> So before the form is submitted . > > You're still confused here. The Tapestry submit event is triggered by the > web server receiving the form submission, so you do *not* want to invoke > the external URL as part of the Tapestry submit event. You want to do > stuff *before* the form submission, so before the Tapestry submit event. > >> So was looking for a way using AJAX and JavaScript to do it. > > So you're asking in the wrong place. This is a Tapestry mailing list and > your question isn't Tapestry-related. It's a pure JavaScript question. > > -- > Thiago H. de Paula Figueiredo > Tapestry, Java and Hibernate consultant and developer > http://machina.com.br > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > > > > ________________________________ > > If you reply to this email, your message will be added to the discussion > below:http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/Tapestry-AJAX-call-on-submit-tp5727687p5727697.html > > > > To unsubscribe from Apache Tapestry Mailing List Archives, click here. > NAML