Posted on 10/01/2008 10:35:31
lgr@proinfo.dk wrote:
HI I have a dropdown menu and it is working fine. BUT under some off the items I have pages that is not ready yet and is therfore not shown in the menu but eabled right now. When the dropdown is shown the pages are not shown BUT there is an indication that there is pages in this menu. Is there a way that I can have the pages that are not active under the menu and without having the indicator for pages under this menu item??
THANKS
Hi Lars
Christian Steinmeier, former employee at a partner - now working at Dynamicweb with VIA, made this simple but effective JS:
// This takes care of hiding the arrows in the dropdownmenus for non-existing submenus.
function csFixDWDropdownMenus() {
var aTables = document.getElementsByTagName("table");
var oTable, t=0;
while (oTable = aTables[t++]) {
if (oTable.rows.length == 0) {
csKillDropdownArrow(oTable.parentNode.id);
}
}
}
function csKillDropdownArrow(sID) {
var oTR = document.getElementById(sID.replace("submenu", ""));
if (oTR) {
oTR.cells[2].getElementsByTagName("img")[0].style.visibility = "hidden";
}
}
Call the csFixDWDropdownMenus in the bodys onload.