Click to See Complete Forum and Search --> : TR Rollover problems


Popey
08-21-2003, 06:29 AM
Hi, i'm designing a site for a client, on several pages there are lists of vending machines, i want the hole tr to change bgcolor onmouseover, i have a script that does this at

http://www.corvenvending.com/fs/confection.htm

on my machine the rollover works fine but on other people computers they get a java error saying that line 16 and 21 have an object which is null and void when they mouse over. Below are the functions that these error messages refer to, i've * the lines.

<script language = "javascript">
<!--

function LmOver(elem, clr)
{elem.style.backgroundColor = clr;
*elem.children.tags('A')[0].style.color = "#000033";
elem.style.cursor = 'hand'}

function LmOut(elem, clr)
{elem.style.backgroundColor = clr;
*elem.children.tags('A')[0].style.color = "#336699";}

function LmDown(elem, clr)
{elem.style.backgroundColor = clr;
elem.children.tags('A')[0].style.color = "#000033";}

function LmUp(path)
{location.href = path;}

//-->
</script>

any help greatly appreciated.

Cheers
Adam