I am trying to change the value of onclick of a td from a function in javascript.
I've tried everything i can think of and i've searched it on the internet but nothing worked, exept from this code below, but the problem with it is that it's executing what i want the value of onclick to be instead of changing it.
<div align=center id=bodyC>
<table width=800 height=410>
<td class=bodyCC>
<table id=MYtable class=MYtable border=0 width=100% height=100% cellpadding=50>
<td id=one class=one onclick=></td>
<td id=two class=two onclick=></td>
<td id=three class=three onclick=></td>
</table>
</td>
</table>
</div>
function download()
{
<!-- this function is called when the Download button on the website's menu is pressed, and is soppused to change the body table so when the sells are clicked an alert will pop.-->
document.getElementById('one').onclick=alert(A..!);
document.getElementById('two').onclick=alert(B..!);
document.getElementById('three').onclick=alert(C..!);
}
any help?
p.s. there are no errors.