If your form validation is for textual data only, it can be done in JavaScript using the Form.Validator class (http://mootools.net/docs/ more/Forms/Form.Validator) -- coupled with Form.Request, you can create an entire system for AJAX form processing that gracefully degrades. Using the Form.Request callback methods (probably "onSend"), you can easily disable the submit button on request (or just set the RequestOptions "link" property to "ignore" -- this will prevent the form from being re-submitted once a submission is in process). I'm not sure what your application is, but often, I want a form to send, and then clear to allow it to be used again for new data. Using the Form.Request method makes that process rather easy.
On Jun 6, 7:35 pm, Oskar Krawczyk <[email protected]> wrote: > formEl.addEvents({ > submit: function(){ > submitButtonEl.disabled = true; > } > > }); > > Not quite sure what do you want to click/double click, tho – I assume, the > submit button itself. > > On 7 Jun 2010, at 01:12, Jake Bottero wrote: > > > > > Byond the server side scripting I use to validate input that hopfully > > catches duplicate input, I'd like to disable the Submit button after > > the first single/double click. > > > This seems to me to be a simple JS solution, but does MooTools offer > > anything that might be interesting for this problem? I'm using > > MooTools for some other things...
