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 you
must 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";
Reputation Points: 520
Solved Threads: 268
Code Monkey
Offline 1,564 posts
since Apr 2005