Recent Questions
Q: I am spending a lot more time and have figured a few things out. One more question please: How do I specify the target link I want a dhtml submenu to go to?
I see HREF specified in the code, but no where in the program to specify it.
A: See, the following parameter sets target for all items
var itemTarget="_self";
If you want to set different target for each item you should set it inthe "Item Parameters" window. Choose your item in the main window andset target in the target field.
Q: Could you please just help me - I have been using quirks mode to create our customer sites and would now like to start using a proper doctype like:
But when I change it, all the down menus dhtml break on the sites.
A: Try to specify all units in "px":
var itemPadding="3px";
var itemStyles = [
["fontStyle=normal 11px Lucida SansUnicode","fontColor=#FFFFFF,#FFFFFF","itemBackColor=#DE2829,#C62829","itemBorderWidth=0",
"itemBorderColor=#FFFFFF,#C21212","itemBorderStyle=solid,solid",
"itemBackImage=blank.gif,blank.gif","itemWidth=160px"], ["itemWidth=129px"],
];
var menuStyles = [
["itemSpacing=0", "itemPadding=8px"]
];
Q: Where can I give the body of the javascript method which I use in cool dhtml menu?
A: You can define functions after menuItems, before you call dm_init();function.
var menuItems = [
["text", "javascript:your_function(...)", ...]
];
Where your_function(...):
function your_function(...)
{
.....
}
Q: However, when I place it inside a CSS-defined div element (for absolute page placement) the submenu's all drop down a couple hundred pixels.
A: See, 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: absolute" 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 style="POSITION: absolute;"
to the
<div id="menu">
So, you'll have:
<DIV id="menu" style="POSITION: absolute;">
Try that.