rizlaa
10-03-2006, 10:06 AM
i have a tabular form with several of the following:
<A HREF="javascript:genCal_X()">< img src="cal.gif" border="0" /></DIV></A>
where the _X refers the to the row. I am able to retrieve and dynamically change the href value using the following:
var links=document.getElementsByTagName('A');
calExp = new RegExp("genCal_"+calRow);
for (var i=0;i<links.length;i++) {
if (links[i].href.match(calExp)) {
links[i].href="javascript:void(0);";
}
}
i want to be able to change the image source as well but am not sure how to gaurantee i change the one associated to the changed href value...
<A HREF="javascript:genCal_X()">< img src="cal.gif" border="0" /></DIV></A>
where the _X refers the to the row. I am able to retrieve and dynamically change the href value using the following:
var links=document.getElementsByTagName('A');
calExp = new RegExp("genCal_"+calRow);
for (var i=0;i<links.length;i++) {
if (links[i].href.match(calExp)) {
links[i].href="javascript:void(0);";
}
}
i want to be able to change the image source as well but am not sure how to gaurantee i change the one associated to the changed href value...