It's exactly this kind of thing that should appear as an example on the new website.
c. -----Original Message----- From: Inge Solvoll [mailto:[email protected]] Sent: 23 November 2010 12:36 To: Tapestry users Subject: Re: Disabling submit button after click Easy: Create a mixin that: - uses javascript to apply "disabled"-looking css styles when clicking the button - hooks a javascript handler to the button that cancels future submits. - on AJAX return, revert 2 previous actions from a javascript listener. On Tue, Nov 23, 2010 at 12:56 PM, Hugo Palma <[email protected]> wrote: > I would like to disable a form submit button after click in order to avoid > multiple clicking. > This can easily be done by calling "this.disabled = true" on the onclick > event of the button but this also prevents the submit event from executing. > > I could do "this.disabled = true;form.submit()" but in my case i have an > ajax form with the zone parameter and the form.submit() forces the "normal" > submit with full page reload. > So, any idea how i can disable the submit button and not cancel the ajax > form submit ? > > Thanks, > Hugo > > -- > > LinkedIn <http://www.linkedin.com/in/hugopalma> > Twitter<http://twitter.com/hugompalma> > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
