Recent Questions Css Tree Structure
Q: In IE 6.0 and Firefox 1.5.0.4, the dropdown submenus are not visible and it does not float in firefox (floats in IE but no submenus) whereas in Opera 8.53 and Opera 9 it works fully.
A: Now you have two entries of dmenu.js file on your site in the <head> and <body> tags.
You must have only one entry of dmenu.js file.
You should write so:
...
<body>
<script type="text/javascript"> var dmWorkPath = "http://www.gaurangapada.org/data.files/";</script>
<script type="text/javascript" src="http://www.gaurangapada.org/data.files/dmenu.js"></script>
</body>
Please, delete the same code from the tag.
Now you have:
var transparency="0";
That is why you can't see your subitems.
Please, write, for example, so:
var transparency="80";
Q: Is there a way to specify certian font styles escpecailly a hanging indent on the text of the navigation menubar?
A: You should use Individual styles, for example:
var itemStyles = [
["fontStyle=bold 12px Arial,Helvetica", "fontDecoration=none,underline"], // style 0
["fontStyle=normal 12px Arial,Helvetica", "fontDecoration=underline,underline"], // style 1
["fontStyle=normal 14px Arial,Helvetica", "fontDecoration=none,none"], // style 2
];
And assign styles to your items:
var menuItems = [
["1 Item","index.php","","","","_self","0",,,],
["2 Item","","","","","_self","1",,,],
["|Submenu Item","","","","","_self","2",,,],
...
Q: Cross-frame mode: after clicking on a menu item and the subframe is loading and then mouse over the menu when the subframe has not finished loading a javascript error occurs and then the javascript vertical menu breaks.
A: You can get this error when you load pages from the another domain.
JavaScript Tree Menu can support this mode for the same domain only -- ifyou loaded a page to a subframe from another domain, the submenuscan't be shown in it. It happens because all browsers don't allow todo that for security reasons. Just imagine if you'll able to create aframeset from 2 frames, 1st frame will be with a zero height-width,and you'll load your page into it. Then user will go to another domainand your "invisible" frame will change a content of other pages!
Q: I don't know anything about what JavaScript is all about...and I'm currently trying to get a menu that will float as I scroll down the page.
I saw the examples you have and I'd love to be able to do that on my website, but I don't understand the scripting that you have written there.
Like, what makes it float from this text...
A: If you want a floatable menu, you should set an absolute position forthe menu and paste the following code into your html page:
Paste the following code into <head> tag
<script type="text/javascript"> var dmWorkPath = "data.files/";</script>
<script type="text/javascript" src="data.files/dmenu.js"></script>
Then set coordinates of top-left menu corner in the data .js file, forexample:
var absolutePos=1;
var posX=30;
var posY=110;
Then set var floatable=1.
The parameter floatable=1 makes a floatable menu.
Also you can change any of menu parameters inside data .js file.