dimoss
Well-Known Member
Hi
I would like to know how is it possible to disable the double click on Save in order to avoid adding the same record twice in the db.
I have found the following code in Javascript but I don't know how to implemented it into my form:
The problem is that even I have put an areuniquevalues validation on an element which work very good in normal situations, in some very very rare and extreme double clicks the validation passes (I don't know how!) I get the same record twice on the db table. I don't know how it happens but it happened at least two times with exactly the same creation datetime!
Any comments on this are very much appreciated!
Thanks
I would like to know how is it possible to disable the double click on Save in order to avoid adding the same record twice in the db.
I have found the following code in Javascript but I don't know how to implemented it into my form:
Code:
<input type="submit" name="Save" value="Save" onclick="this.disabled=true; this.value='Please Wait...';" />
The problem is that even I have put an areuniquevalues validation on an element which work very good in normal situations, in some very very rare and extreme double clicks the validation passes (I don't know how!) I get the same record twice on the db table. I don't know how it happens but it happened at least two times with exactly the same creation datetime!
Any comments on this are very much appreciated!
Thanks