|
Posted by Rob King on 10/07/66 11:16
Ok, just the quotes missing and a php tag of two:
<script>
function switchColors(element, color) {
links=document.getElementsByTagName("a") ;
for (var i = 0 ; i < links.length ; i ++)
links.item(i).style.color = 'blue' ;
element.style.color=color ;
return true;
}
</script>
I have an echo php link with a javascript mouseout, why doesnt this work?
<?php
$array="hello world";
print "<a id=link1
href=\"$PHP_SELF?action=list_records&cur_page=$varray&id=$id\"
onmouseout=\"javascript: switchColors(this, 'yellow')\"> $array </a></td>";
?>
Irlan agous wrote:
> function switchColors(element, color)
> {
> links=document.getElementsByTagName("a") ;
> for (var i = 0 ; i < links.length ; i ++)
> links.item(i).style.color = 'blue' ;
>
> element.style.color=color ;
> }
>
>
>
> I have an echo php link with a javascript mouseout, why doesnt this work?
>
> <a href=\"$PHP_SELF?action=list_records&cur_page=$varray&id=$id\"
> onmouseout=javascript:switchColors(this, 'yellow')> $array </a></td>";
>
>
> Irlan
>
>
>
>
Navigation:
[Reply to this message]
|