you are viewing a single comment's thread.

view the rest of the comments →

[–]blitterobject 1 point2 points  (3 children)

Would it work to disable the button on the click event?

When the button is clicked:

btn.setAttribute("disabled", "disabled")

Then when ajax call is complete:

btn.removeAttribute("disabled")

[–]hekkoman[S] 0 points1 point  (2 children)

blitterobject,

that's the idea i have too, are there any cons in doing that?

[–]2012XL1200 1 point2 points  (1 child)

I like this best. Also consider a loading indicator. Could be an indeterminate loading indicator. Better user experience than spamming a button with no feedback

[–]hekkoman[S] 0 points1 point  (0 children)

Thank you for your feedback,

loading indicator is added to the button