PDA

View Full Version : Issue with link in chromemenu main item with dropdown feature



I-eye
01-09-2007, 08:16 AM
Chromemenu
http://www.dynamicdrive.com/dynamicindex1/chrome/index.htm

Hi,

I am trying to incorperate chromemenu in a website. I have put the building of the menu structure into a js file, so that it can easily be changed on one position in the website, and added it into several htm pages within the site.

When I try to add a link to the main item AND use a reference to a dropdown on that main item, the link isn't followed when clicked on:


document.write("<div class='chromestyle' id='chromemenu'>")
document.write("<ul>")
document.write("<li><a href='default.htm' rel='dropmenu1'>Home</a></li>")
document.write("</ul>")
document.write("</div>")

document.write("<div id='dropmenu1' class='dropmenudiv' style='width: 170px;'>")
document.write("<a href='welkom_historie.htm'>Historie</a>")
document.write("<a href='welkom_organogram.htm'>Organogram</a>")
document.write("</div>")
When I remove the rel='dropmenu1' it does work:

document.write("<div class='chromestyle' id='chromemenu'>")
document.write("<ul>")
document.write("<li><a href='default.htm'>Home</a></li>")
document.write("</ul>")
document.write("</div>")
This is tested in IE7.

Is there a way to work around this behaviour?

ddadmin
01-09-2007, 08:30 AM
If I understood you correctly, inside the .js file of the menu, just change the line near the top:


disablemenuclick: false, //when user clicks on a menu item with a drop down menu, disable menu item's link?

to false.

I-eye
01-09-2007, 08:34 AM
you understood me correctly! this does the trick... this reminds me to look at the code the next time, especially when it is commented like this. :-)