I need to disable one of the custom javascript buttons after the first click. I've found that I can use(and I actually did use this in the past) this 2 lines of code to disable a button:
this.disabled = true;
this.className = 'btnDisabled';
but nothing happens. My button just stays active and clickable. Even if I put an alert('test');
before/after these 2 lines, I do get the alert popup, but the button is still active. Does anyone know what can be the problem(was this feature removed from Winter 16 or one of the previous releases?)? And is there another way to achieve this?
EDIT
It seems that this way is no longer working since Winter 16(or earlier?). I just checked it in the other org where it did work before, but now it doesn't disable the button anymore.