Don’t send your data twice - a little widget
How many times do we need to disable a button after sending a xhr call or submitting a form?
Almost everytime, the element which induces a data transfer, should be disabled until you get a reply from the server.
I’ve written a short and simple extension of the “dijit.form.Button” widget called “dojox.form.BusyButton”, which provides a simple API to let you deal with those cases when you don’t want to allow the user to hit the submit button a second time. (more…)
JavaScript addicts