Recent Questions
Q: I'm trying out Deluxe Menu with my site, but I've hit a snag with alignment. My menu bar is located at the top of my page, in a 750px-wide div. I'd like to nest the nav menu in that div, but right-align it so the menus are stuck to the right side of the div. Is that possible with your menu system? If so, can you give an example of how I would accomplish it?
A: You can paste your menu in DIV with right alignment.
<div align="right">
<script type="text/javascript" src="data-deluxe-menu.js"></script>
</div>
Q: When I load a page with dhtml menu sample, lets say contact, the first tab is always highlighted, not the contact tab
A: I suppose that you've set the following parameter:
var bselectedItem=1;
So, the first tab is always highlighted.
This Tab menu can save pressed item automatically within1 page only. If you open another page, the menu can't remember presseditem. You should do that manually using Javascript and menu parameters( var bselectedItem, var bselectedSmItem) or using any server-sidescript (php, asp, etc.)
You should delete this parameter from your data file and write thefollowing code on each page before you call your data file, for example:
<script language="JavaScript1.2>
var bselectedItem = 3;
</script>
Q: Is there a javascript function that I can call that will return the ID or the Text value of the currently checked tab?
A: Unfortunately there is no such a function now.
There are such variables.
dtabs_tabs[menuN].b1 - dtabs_tabs[menuN].selectedItem
dtabs_tabs[menuN].JT0 - dtabs_tabs[menuN].selectedSmItem
But they contain the index of the selected menu item, not the ID.
Q: Is it possible to show a menu item in the simple navigation bar as selected by default to indicate what the current page is?
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" 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.