Recent Questions Richfaces Tree Browse Filesystem
Q: The asp drop down menu should indicate with on which page I me just considers
(with anothercolour of the font of the active Link from the navigation, or an underline, bolder font, ...).
A: JavaScript Tree Menu has only two states normal and mouseover, but
you can highlight menu items in two ways:
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.
You can find more info here:
http://www.deluxe-menu.com/highlighted-items-sample.html
Q: I have downloaded the trial version and so far I really like what I see except for one issue. Any page that includes the following doctype:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
seems to break the absolute positioning of the menu and sends it to the far upper left corner of the page. Any help on fixing this would be greatly appreciated.
A: The problem is in <!DOCTYPE> attribute.
Please, set 'px' units for posX and posY parameters,for example:
var posX="100px";
var posY="100px";
Q: We have two frames in a frameset, one for the menu and one for the content where the javascript menu frame expands normally without any problem. Our content frame's source is determined dynamically. The problem occurs when the content frame contains a page with another frameset in it. Unfortunately we can not avoid this for now. And when this happens our menu stops expanding.
A: Unfortunately it is really possible that you'll have problems in thatcase because the index of the content frame will be changed.
For example now you have:
<frameset id="frmSet">
<frame> //menu index=0
<frame> //content index=1
</frameset>
Your init function will be:
dm_initFrame("frmSet", 0, 1, 0);
But if you'll have frameset instead of content frame:
<frameset id="frmSet">
<frame> //menu index=0
<frameset>
<frame> // index=1
<frame> //content index=2
</frameset>
</frameset>
You should write your init function in the following way:
dm_initFrame("frmSet", 0, 2, 0);
You should change your javascript menu frame init function in that case.
Q: Will the java menu api changing the node image on the fly in real time?
A: Yes, API functions will change the node image on the fly.