Recent Questions Javascript Tutorial Of Tree Menubar Stylish
Q: Can you please write me, can I have the active menu button in the javascript menu generator different color display.
A: The 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: Can I move the submenu 5px to the right so it doesn’t stick to the main tree javascript hierarchical menu (Please try to separate them without a color).
A: You should set the following parameter:
var topDX=5;
Q: Currently let us know how can we align the text at the top dropdown menu script so that the text will appear above the horizontal line.
Kindly help us to solve this problem as soon as possible.
A: Unfortunately you cannot set vertical align for items text.But you can try to write your item text in the following way:
var menuItems = [
["Home<br> ","/index.asp?pgid=1", , , , , "0", , , ],
["About Us<br> ","/index.asp?pgid=2", , , , , "0", , , ],
["Company News<br> ","/index.asp?pgid=3", , , , , "0", , , ],
["Services<br> ","/index.asp?pgid=4", , , , , "0", , , ],
["|Custom Publishing","/index.asp?pgid=6", , , , , , , ,],
["|On Product Publishing","/index.asp?pgid=7", , , , , , , , ],
["|Investment","/index.asp?pgid=10", , , , , , , , ],
["Contact Us<br> ","/index.asp?pgid=5", , , , , "0", ,, ],
];
Q: How i can isert any html code in css dynamic menu?
A: You are able to paste any html code within items.
So you can paste a form too.
For example:
var menuItems = [
...
["||<nobr><FORM method=GET action='http://www.google.com/custom'><input name='as_q' value='searchthe web' size=15 style='font-size:10'> <INPUT type=hidden name=cof
value='LW:144;L:http://domain.edu/images/sulogo.gif;LH:45;AH:center;GL:0;S:
http://domain.edu;AWFID:e01cb67b8afe383e;'></form></nobr>","", "images/icons/search.gif", "", "", "", "", "2", "", "", "",],