I'm facing an issue with my onclick code on an image, which is supposed to disable a button on my form. Here's what it looks like:
<img alt="" src="images/search-icon.png" width="16" height="16" style="display: inline;height:16px;cursor:pointer; width: 16px;" onclick="DisableButton('<%=btnSave.ClientID %>');" />
In my JavaScript, I have the following code:
function DisableButton(bSave) {
document.getElementById(bSave).attributes("Enabled", false);
}
The problem is that this code doesn't seem to work as expected. Whenever I click on the image, nothing happens. Could there be an error in my code? I'd appreciate any help or insights you can provide on this matter. Thank you in advance.