I am a Javascript newb, and I am haveing some trouble with my arguments.
while($row=mysql_fetch_array($query)) { echo ' <td class="bar" onmouseover=Javascript:openMenu("' . $row['category'] . '") onmouseout=Javascript:closeMenu("' . $row['category'] . '")> <a href="category.php?cat=' . $row['category'] . '" class="top_menu"><div>' . $row['category'] . '</div></a><div>';
Based on the W3C standards youmust encapsulate attribute values in quotes ie, name="hello" is right, name=hello is wrong.
So your echo is breaking the script.
echo
"<td class='bar' onmouseover='openMenu(\"".$row['category']."\");'
onmouseout=''closeMenu(\"".$row['category']."\");' >
<a href='category.php?cat=".$row['category']."' class='top_menu'><div>".$row['category']."</div></a><div>\n"; ShawnCplus
Code Monkey
Team Colleague
1,583 posts since Apr 2005
Reputation Points: 526
Solved Threads: 268