Click on Submit/Save button multiple times,Data is saving more than one

By | June 1, 2017

In an ajax based save functionality.if i click multiple times on the save button.same data is saved in db more than one depends on the number of clicks

How to handle this issue in jquery

solution:
1)hide the submit/save button or disable the button after click.
2)use the encodeURIComponent() function for the data passing in the ajax call
3)if multiple ajax calls are there then use settimeout() function to execute second ajax call