JavaScript addicts

August 2, 2008

Don’t send your data twice - a little widget

Filed under: dojo — Tags: , — Nikolai Onken @ 1:43 pm

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

Copyright 2008 - Uxebu, Ltd.
All Rights Reserved