Hi,
I can't figure out how to reference individual items returned by getElementsByName . Can somebody help please?
This code only returns one item, but I cannot use the ID some must use the name, hence the use of getElementsByName rather than getElementByID
function()
{
var aInput = window.document.getElementsByName("Cell1"
alert(aInput.item()) etc just brings up null,
as does alert(aInput.item(0))
nb "Cell1" is the name attribute of a TD. I want to be able to reference that individual TD from my javascript, so I can change its colour.
Thanks
Graeme
I can't figure out how to reference individual items returned by getElementsByName . Can somebody help please?
This code only returns one item, but I cannot use the ID some must use the name, hence the use of getElementsByName rather than getElementByID
function()
{
var aInput = window.document.getElementsByName("Cell1"

alert(aInput.item()) etc just brings up null,
as does alert(aInput.item(0))
nb "Cell1" is the name attribute of a TD. I want to be able to reference that individual TD from my javascript, so I can change its colour.
Thanks
Graeme