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> >
