Look at the bottom, hope it works!
On Wed, 06 Aug 2003 16:33:42 +0000, Cool Mentalist wrote:
function lightUp(light){
light.style.background="yellow"
}
[a onclick="lightUp(id of a td)"] hello [/a]
[a onclick="lightUp(id of a different td)"] hello2 [/a]
[a onclick="lightUp(id of a yet another td)"] hello3 [/a]
etc etc
how can i make this work?
Try this:
<html>
<head>
<title>Illustration</title>
<script type="text/javascript">
function lightUp(light){
var elem=document.getElementById(light);
elem.style.background="yellow";
}
</script>
</head>
<body>
<p id="p1" onClick="lightUp('p1');">ciao</p>
<a id="a1" href="../xxx.html" onClick="lightUp('a1');">ciao</a>
</body>
</html>