I am attempting to update the image URL when a specific image button is clicked, however, I am encountering an issue where the image does not change.
It seems that none of the JavaScript functions are successfully altering the image and are unable to identify the ID of the imagebutton.
Are there any recommendations or suggestions on how to resolve this problem?
<div class="content-wrapper">
<script src="Default.js"></script>
<asp:UpdatePanel runat="server">
<ContentTemplate>
<div class="sliderDivImages">
<div class="buttonContainer">
<asp:ImageButton runat="server" id="projectManagementButton" OnClientClick="ButtonClick()" CssClass="button" ImageUrl="Images/button_ProjectPrintManagement.png"></asp:ImageButton>
<p class="button">
PROJECT &<br />PRINT MANAGEMENT
</p>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
function ButtonClick() {
$("<%= projectManagementButton.ClientId %>").attr("src", "Images/buttonLight_ProjectPrintManagement.png");
var projectManagementImg = document.getElementById("projectManagementButton");
var imageButtonID = $(this).attr("ID");
return false;
}