Forum Moderators: open
I would like to change the onclick attribute of this link.
<a href="/109/" onClick="return o('109');" id="sub4">...</a>
With any of these links:
<a href="/208/" onClick="return s(208);">...</a>
<a href="/209/" onClick="return s(209);">...</a>
<a href="/210/" onClick="return s(210);">...</a>
This is what my s function javascript looks like so far:
function s(x){
document.getElementById("sub4").onClick="return o("+x+");";
return false;
}
I've followed the same format I used when changing other attributes of various other elements, but this one doesn't seem to work.
Do I need to do something special with this since I want to change a javascript attribute? Is it impossible?
Any advice is much appreciated.
Thanks