Dec
30
A problem that many programmers encounter is trying to prevent the user from submitting a form twice and inadvertently posting two sets of the same data – or in worse scenarios, charging a credit card twice!
It’s a frustrating problem that is easily solved if you put your mind to it – ignoring it is nothing short of lazy.
On the client-side, we can use JavaScript to prevent the user from submitting the form more than once. Observe: