Dec 22, 2011, 2:38 PM
[CLOSED] Click event launched several times
Hi, I have a web page where you fill information, and at the bottom a button to save this info. After the database saves this info succesfully (or in case that any error occurs), an alert is shown to the user.
I have discovered that, between the button click and the alert show, the user can click several times more the save button. These new clicks causes a new save on the database. I have tried locking the button (disabling after the click and enabling it after the message show), but this implies to add new code to a lot of places and I'm searching for a "cleaner" solution.
Can you give me any idea to solve this?
Thank you in advance
I have discovered that, between the button click and the alert show, the user can click several times more the save button. These new clicks causes a new save on the database. I have tried locking the button (disabling after the click and enabling it after the message show), but this implies to add new code to a lot of places and I'm searching for a "cleaner" solution.
Can you give me any idea to solve this?
Thank you in advance
Last edited by Daniil; Dec 29, 2011 at 1:37 PM.
Reason: [CLOSED]