H
Hooligan
Hi
I'm attempting to add a hyperlink to a table cell using javascript.
Here's the code:
var cell = document.getElementById("td1");
var aHref = document.createElement("A");
aHref.innerText = "hello";
aHref.href = "index.htm";
aHref.title = "hello";
aHref.id= "alinkage";
cell.appendChild(aHref);
This works with IE but I can't get it to work with Firefox.
I can see that cell.childNodes is incremented after running this code
but nothing is displayed.
Any tips would be grateful.
I'm attempting to add a hyperlink to a table cell using javascript.
Here's the code:
var cell = document.getElementById("td1");
var aHref = document.createElement("A");
aHref.innerText = "hello";
aHref.href = "index.htm";
aHref.title = "hello";
aHref.id= "alinkage";
cell.appendChild(aHref);
This works with IE but I can't get it to work with Firefox.
I can see that cell.childNodes is incremented after running this code
but nothing is displayed.
Any tips would be grateful.