I am using AW controls for displaying a form (for editing a row in a grid) and I have experienced that on a slow performing server-client network, if the user presses the submission button twice quickly, the form can be submitted twice.
submit_button = new AW.UI.Button;
if (submitted) returnfalse;
var submitted = true;
.. but again, I can't see that this is working (still seem able to submit twice). Is the above a valid approach to the problem, or can anyone suggest anything else?
Wednesday, July 19, 2006
You have to declare you status variable ('submitted') outside of the function (othervise it is local, i.e. loses value on exit and re-initialized on the next call).