I'm making a page that should display the variable of my choosing within a table. I did the same thing twice, changed the id's and cuch, but only one works. I spent an hour looking over the syntax, and redoing allot of the work but it just doesn't help. Here's the three main pieces of code:
var NewGlad = new Array("Jokomopo","Etony","Roy");
var BestGlad = new Array("Johnny","Cod","Billy");
function UpdateTable(){
document.getElementById("0New").innerHTML = "<a href='" +NewGlad[0]+ "'>" + NewGlad[0] + "</a>";
document.getElementById("0Best").innerHTML = "<a href='" +BestGlad[0]+ "'>" + BestGlad[0] + "</a>";
}
//The function above IS executed onLoad.
Here's the html, I'll just show you the table row we're dealing with:
<tr>
<td class="NewestGlads" id="0New">
fgggrf
</td>
<td class="BestGlads" id="0Best">
fgggrf
</td>
</tr>
Only the NewestGlads td is updated. The other still displays "fgggrf"