Recent Questions
Q: I've been trying to get the menu item in dynamic tree menu to stay highlighted when clicked on and directed to that page.
A: Tree Menu doesn't save a presseditem as it saves a tree state.
It works within 1 page only and if youreload the page you should set a pressed item using Javascript API:
function apyt_ext_setPressedItem(menuInd, itemID)
<script type="text/javascript">
var i = 4 //index of the selected item
onload=setPressed;
function setPressed()
{
dtreet_ext_setPressedItem(0,dtreet_ext_getItemIDByIndex(0, i));
}
To expand specific items you should use the following function:
dtreet_ext_expandItem (dtreet_ext_getItemIDByIndex (0, 11), 1);
Q: I'm currently experimenting with your script which I far more performant than any of the other I have tried so far, so we will probably go with yours and get a distributer license.
I do have a problem though...
I have two menus on my site.
Unfortunately, as they are being used, if you go over the first item in the left menu, it will show its submenu at the top; if you go over the first item of the top menu, it will also show the contents of the second menu...
How can we change this?
A: Installation of your menu is not correct.
See more info about installation here:
http://deluxe-menu.com/installation-info.html
There is no
<script type="text/javascript"> var dmWorkPath = "menudir/";</script>
parameter on your page.
Notice also that you should call dmenu.js file only once and then callyour data files.
Now you have two calls of dmenu.js file.
Q: Also once you click a link and go to a new page, how do you get the java choice menu tab for that new page to stay the highlighted one?
A: Deluxe Tabs doesn't support API functions which can return theselected tab aslo.
You can set "bselectedItem" and " var bselectedSmItem" parametersbased on your link before you call your data file.
For example, move " var bselectedItem" and " var bselectedSmItem" parametersfrom your data file to your code.
<TD vAlign=top align=left>
/* Select Tab */
<script type="text/javascript" language="JavaScript1.2">
var bselectedItem=<?php echo $seltabs; ?>;
var bselectedSmItem=<?php echo $selsmtabs; ?>;
</script>
<SCRIPT src="data.js" type=text/javascript></SCRIPT>
</TD>
You should define seltabs and selsmtabs using server side script.
You can also set it on every page before you call data.js file, forexample:
<TD vAlign=top align=left>
/* Select Tab */
<script type="text/javascript" language="JavaScript1.2">
var bselectedItem=4;
var bselectedSmItem=3;
</script>
<SCRIPT src="data.js" type=text/javascript></SCRIPT>
</TD>
Q: I am still struggling with multiple menus on one page.
It is probably something I am doing wrong, but I cannot see it.
A: Now you have:
var absolutePos=1;
var posX="10";
var posY="10";
So, both of your menus have the same absolute position.
You can use relative position and place your menu inside <table>. In this case you should write so:
var absolutePos=0;