I am a Javascript newb, and I am haveing some trouble with my arguments.
function openMenu(tableName) {
document.getElementById(tableName).style.visibility="visible";
}
This is the code i have, and it is working perfectly on the different menus at the top of my screen. The problem i have is with my table IDs, i get the ids from a database using php, and one of them has a space in the centre, so that one doesnt work. This is my php if anything can be changed in either language i would be grateful for any help.
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>';