Recent Questions Javascript Tree Menu For C Net
Q: We are using your deluxe menu on our live site, but I have a question about the initial setup of the menu.
I need to update the site and a create a new version where the JavaScript Tree Menu is painted, but not initially displayed until the user has been validated. We are runing the entire site from a single page with multiple iFrames. I have been using the code document.getElementById('dm0m0').style.visibility = "hidden"; to hide the menu during startup, but I would rather have the floating menu hidden initially and then displayed as the user is validated and gain access to the functionality.
So the question is: Is there a property in the data.js file - or any other file - where the menu can be hidden initially until needed?
A: You can hide the menu onloaddocument.getElementById('dm0m0').style.visibility = "hidden";
And then show the floating menu when your user will be validated.
Q: We would like Subprograms to have a different style than the items below it to visually indicate it as a non-clickable header in my javascript drop down menu.
A: You should disable this item. You should set "_" symbol for the itemtarget.
You can also set
var fontColorDisabled="#616321";
You can also create Individual Style for the disabled item.
Q: I need to be able to highlight the selected menu item of the sliding drop down menu.
A: JavaScript Tree Menu has only two states normal and mouseover.
Try to do the following things:
- delete var pressedItem=1; parameter from your data file
- set correct parameter on each page before you call data file, forexample:
<noscript><a href="http://deluxe-menu.com">Javascript Menu by Deluxe-Menu.com</a></noscript>
<script type="text/javascript"> var dmWorkPath = "menudir/";</script>
<script type="text/javascript" src="menudir/dmenu.js"></script>
<script type="text/javascript"> var pressedItem=3;</script>
...
<script type="text/javascript" src="menudir/data.js"></script>
You can also set a pressed item using Javascript API:
function dm_ext_setPressedItem (menuInd, submenuInd, itemInd, recursion)
Sets a current pressed item.
menuInd - index of a menu on a page, >= 0.
submenuInd - index of a submenu, >= 0.
itemInd - index of an item, >=0.
recursion = true/false - highlight parent items.
But notice, to use dm_ext_setPressedItem() you should know ID of selected item and subitem.
You can't get this ID after you reload your page. That is why you should write your own code on PHP.
Q: Is there any way to prevent the scrollbar from appearing in the dhtml menu samples.
A: You should set the following parameter:
var smSmartScroll=1;