Recent Questions Javascript Tree Checkbox Example
Q: Just wondering if you could help.I wish to put a script java menu on every page of my site - through all the folders etc.
How do I set it so that they all 'feed' from the same dmenu.js file?
How do I set the file path to that file from all pages of my website?
A: 1) How do I set it so that they all 'feed' from the same dmenu.js file?
You should use absolute path here:
1. Paste the following code into a tag of your page:
<!-- JavaScript Tree Menu -->
<noscript><a href="http://deluxe-menu.com">Javascript Menu by Deluxe-Menu.com</a></noscript>
<script type="text/javascript"> var dmWorkPath = "http://site.com/menudir/";</script>
<script type="text/javascript" src="http://site.com/menudir/dmenu.js"></script>
<!-- (c) 2009, http://deluxe-menu.com -->
2. Paste the following code where you want to have the menu:
<script type="text/javascript" src="http://site.com/menudir/data.js"></script>
2) How do I set the file path to that file from all pages of my website?
If you don't want to create your menu on each page, you can try to useframes, the menu has a cross-frame mode.
Also you can use aserver-side script (php, asp, vb, etc.) to generate html pages fromtemplates on your server.
Q: Comprehensive Mental Health has a site license to \use JavaScript Tree Menu. We are currentlyrunning version 2.0.
Unless we set the topdy parameter to be -65, our submenus do not appear adjacent to the toplevel menu. Below are our parameters and our menu. What is causing this problem?
A: It is possible that you have some problems with your css.
The problem is that the script can't get css properties of the object if they are described in separate .css block (or file).
In other words, you can't get the value of "position" attribute of the object if the object doesn't have this property within inline style(style="position:absolute"). To get the value you should move .css style into style="" attribute.
Please, try to add your
css file -> inline css, for example:
You should add <DIV id=SiteMenu>
to the
style="position:absolute;"
So, you'll have:
<DIV id=SiteMenu style="position:absolute;">
Check that.
Q: Does dropdown menu javascript supports right to left languages?
A: Yes, JavaScript Tree Menu support right to left languages, set the following parameter:
var dmRTL=1;
Specify also align for your items:
var itemAlignTop="right";
var itemAlign="right";
Q: Expandable javascript menu doesn't actually affect the plus/minus icon I have specified. Any ideas?
A: It is not correctly to add expand/collapse buttons into the iconfield, they won't work. You should add icons there.
To add expand/collapse buttons you should use the followingparameters:
var texpandBtn=["img/expandbtn.gif","img/expandbtn.gif","img/collapsebtn.gif"];
var texpandBtnW=14;
var texpandBtnH=14;
var texpandBtnAlign="left";