I have the following Javascript function that I am trying to call from inside a PHP block. The function simply highlites a link when the user mouses over it (the unhighlite function is not show for implicity sake):
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
function doColor(item, color)
{
item.style.color = color; // changes text color
}
</script>
The PHP code looks like this:
<A NAME = 'index' HREF= 'Some_Link'
onmouseover = \"doColor(index, 'aqua');\"
onmouseout = \"undoColor(index);\" </A>
But the JScript keep complaining with this error msg:
'style' is null or not an object.
It acts like does not know what the name "index" is all about.
Any help would be appreciated.