I am trying to briefly disable a 'Save' button on a page during requests to prevent users from clicking it twice. Following advice that I found here, I put
elem.setAttribute("disabled","disabled")
at the very beginning of the onclick
method, but it doesn't work, I can still click multiple times very fast and cause multiple requests to be sent before the buttons get disabled. Does anyone have any advice?