Recent Questions
Q: Please identify the parameter I need to set to produce ... Tree menu items start out as normal text , then Bold text for tree menu items on the onmouseover event . After mouse out, text returns to normal.
A: Unfortunately, Deluxe Tree doesn't have such a feature. You should addthe following code in your data file:
function changeFont(obj, over)
{
obj.style.fontWeight = over ? 'bold' : 'normal';
obj.style.fontSize = over ? '13px' : '12px'; // You can not use this line
}
var tmenuItems = [
["<div onMouseOver='changeFont(this, 1)' onMouseOut='changeFont(this, 0)'>Security</div>","", "", "", "", "", "", "", "", ],
["<div onMouseOver='changeFont(this, 1)' onMouseOut='changeFont(this, 0)'>Ease of Access</div>","", "", "", "", "", "", "", "", ],
["|<div onMouseOver='changeFont(this, 1)' onMouseOut='changeFont(this, 0)'>Internet Options</div>","", "", "", "", "", "", "", "", ],
["|<div onMouseOver='changeFont(this, 1)' onMouseOut='changeFont(this, 0)'>Windows Firewall</div>","", "", "", "", "", "", "", "", ],
["<div onMouseOver='changeFont(this, 1)' onMouseOut='changeFont(this, 0)'>Network and Internet</div>","", "", "", "", "", "", "", "", ],
];
Please, notice also that you should add this function every time whenyou change your menu in Deluxe Tuner application, as Tuner deletesthis function.
You can find the example here
http://deluxe-tree.com/data-templates/vista-style-7-template-sample.html
Q: Can I use javascript to get the object (getElementByID). If not howdo I hide my dropdown menu on print?
A: You can add a new button to print your page and call onClick event, soyou should write:
<body ....
onClick="document.getElementById('dm0m0').style.visibility='hidden'; window.print();">
...
</body>
Or you can use the same javascript code from your menu item.
For example:
var menuItems = [
["Print", "javascript:document.getElementById('dm0m0').style.visibility='hidden';
window.print();", icon1, icon2],
];
But if you want to hide the menu when your customers push "File/Print"you should write so:
You must create two functions, for example:
function myprint()
{ document.getElementById('dm0m0').style.visibility='hidden';
window.print();
}
function myprint2()
{ document.getElementById('dm0m0').style.visibility='visible';
window.print();
}
You should add this functions into your code.
And then you must write so:
window.onbeforeprint = myprint;
window.onafterprint = myprint2;
Q: If there was a way to show the links inside the html code instead of the dhtml menu js files. Shouldwe use an alternative mode as (css Style?)
A: You can move menuItems into html page directly inside <script> ...
</script> tags:
<script>
var menuItems [
...
];
dm_init();
</script>
You can also use search engine friendly code and install it on yourpage before you call your dhtml menu js file.
You'll see text links in that case.
To create a search engine friendly menu you should add additional html code within your html page:
<div id="dmlinks">
<a href="http://deluxe-menu.com">menu_item_text1</a>
<a href="http://deluxe-tree.com">menu_item_text2</a>
...etc.
</div>
To generate such a code use Deluxe Tuner application.
Run Tuner, load your menu and click Tools/Generate SE-friendly Code (F3)
Q: When I use API like <script>dm_ext_deleteItem(0, 0, 0);</script> it works fine in my first dhtml drop down menu code (menu.js) but I'm unable to reach second one (menu_gauche.js). I’ve tried this : <script>dm_ext_deleteItem(1, 0, 0);</script> and the page came’s out with a JavaScript error on that line. I’ve read on your side about dm_ext_deleteItem api and the first parameter is for menu Id … If there anything that I have forgot ??
A: You cannot use the following function for the tree menu:
dm_ext_deleteItem(1, 0, 0);
There is no such function there:
You should use
dtreet_ext_deleteItem (0, 0)
for the tree menu, see more info:
http://deluxe-tree.com/functions-info.html
You should set menuInd=0 if you have only one dhtml drop down menu code on your page.