Web Hosting Talk







View Full Version : Navigation bar Javascript question


ArtisticGifts
06-29-2007, 01:42 PM
Hello all.

I am having a slight problem with a vertical navigation bar. The bar is in its own div section set with float and a specific width. Some of the links in the bar need to open up an addition set of categories to the right. I've tried putting each sub menu into a div and then using a onmouseover & onmouseout combination to hide and display the div submenu, however this makes the submenu just appear and doesn't actually make it clickable. I've tried searching the web for some clues on what script combination to use but I've just ended up more confused. :eek:

I've included a copy of what Dreamweaver CS3 has generated as code:

<script type="text/javascript">
<!--
function MM_changeProp(objId,x,theProp,theValue) { //v9.0
var obj = null; with (document){ if (getElementById)
obj = getElementById(objId); }
if (obj){
if (theValue == true || theValue == false)
eval("obj.style."+theProp+"="+theValue);
else eval("obj.style."+theProp+"='"+theValue+"'");
}
}
//-->
</script>

<a href="" onmouseover="MM_changeProp <a href="" onmouseover="MM_changeProp('menuprofessionalwear','','visibility','visible','DIV')"
onmouseout="MM_changeProp('menuprofessionalwear','','visibility','hidden','DIV')">Professional Wear</a>


Thanks in advance for the help

ServWise
06-30-2007, 02:55 AM
Save yourself some time and headaches and use a good drop down menu script like one of these.

http://www.milonic.com/
http://www.udm4.com/
http://www.htmldog.com/articles/suckerfish/dropdowns/