Here is a simple JavaScript function that allows me to dynamically change the textbox in a method during runtime.
function MyTst(pVal2) {
var x = document.getElementById('<%=myImage.ClientID%>');
x.src = "/images/write.gif";
}
I want the code to be more generic by replacing '<%=myImage.ClientID%>' with the input parameter of my method, which in this case is pVal2 containing the ASP.NET server control image id.
I have tried various methods to accomplish this without success. Any advice on how to achieve this would be greatly appreciated.
Thank you for your help.