Recent Questions
Q: It seems that if I try and use the syntax ["| with some HTML such as <DIV class = 'myclass'> inside dropdown menu it IGNORES the HTML and just treats it like another link.
But if I don't start the line with ["| ..... Then I get a syntax error.
For example:
I am trying to place 4 links in a square shape in the top left of my screen. To do this I was going to create DIV's and set the TOP and LEFT to different values from within a loop (I left out the code that does the updating for myleft and mytop...)
var menuItems = [
<loop>
["|<div style='position: absolute; left: <cfoutput>#myleft#</cfoutput>px; top: <cfoutput>#mytop#</cfoutput>px>'","", "", "", "", "", "", "", "", "", "",],
["|#ParentMenuDesc#","index.cfm?Workflow=#Workflow#&role=#Privilege_id#&cacheid=#createuuid()#&Process_Type=#Process_Type#&PageMode=#Process_Logic#", "#menu_option_icon#", "", "", "_top", "", "", "", "", "",],
["|</div>","", "", "", "", "", "", "", "", "", "",],
<end loop>
];
What am I doing wrong here?.... Can you show me how to accomplish this task?
A: No, this syntax is incorrect. It won't work.
var menuItems = [
<loop>
["|<div style='position: absolute; left: <cfoutput>#myleft#</cfoutput>px; top: <cfoutput>#mytop#</cfoutput>px>'","", "", "", "", "", "", "", "", "", "",],
["|#ParentMenuDesc#","index.cfm?Workflow=#Workflow#&role=#Privilege_id#&cacheid=#createuuid()#&Process_Type=#Process_Type#&PageMode=#Process_Logic#", "#menu_option_icon#", "","", "_top", "", "", "", "", "",],
["|</div>","", "", "", "", "", "", "", "", "", "",],<end loop>
];
You should have <div> ... </div> tags in each dropdown menu item!
It is not correctly to write <div> ... </div> tags for wholesubmenu.
var menuItems = [
["|<div style='position: absolute; left:<cfoutput>#myleft#</cfoutput>px; top: <cfoutput>#mytop#</cfoutput>px>text</div>'","", "", "", "", "", "", "", "", "", "",],
["|#ParentMenuDesc#","index.cfm?Workflow=#Workflow#&role=#Privilege_id#&cacheid=#createuuid()#&Process_Type=#Process_Type#&PageMode=#Process_Logic#", "#menu_option_icon#", "","", "_top", "", "", "", "", "",],
["| ","", "", "", "", "", "", "", "", "", "",],
];
Q: I have used dhtml vertical menu on my site....when I open it in IE it works fine but in mozilla it shifts to right...wht can i do so tht it will be placed at same position in all browers
A: You can try to set exact width in "px":
var menuWidth="500px";
Q: If you click a list drop menu link in the tree that opens a new page, for example, Solutions:By Type:Psuedo Wire , the link, Psuedo Wire, remains highlighted.
If you click a line that targets _self, for example, Solutions: By Type: T1 Extender, the link does not remain highlighted. My web app will need highlighting and all links will target _self. I have to solve this problem soon or else look elsewhere.
A: It is normal behaviour, your list drop menu can save its state within one page only.
You can try to use frames, and open pages in the content frame. Also you can use aserver-side script (php, asp, vb, etc.) to generate html pages fromtemplates on your server (we use this method on our website
http://deluxe-tree.com).
You should set a pressed item using Javascript API:
function apyt_ext_setPressedItem(menuInd, itemID)
<script type="text/javascript"><br>
var i = 4 //index of the selected item
onload=setPressed;
function setPressed()
{
dtreet_ext_setPressedItem(0,dtreet_ext_getItemIDByIndex(0, i));
}
</script>
To expand specific items you should use the following function: dtreet_ext_expandItem (dtreet_ext_getItemIDByIndex (0, 11), 1);
Q: I want to change the background color of one of the menu items of the menu horizontal.If I understand correctly I go to INDIVIDUAL STYLES and should be able tochange the background color for one of the menu items there. Under item appearance I tried to change itemBackColor - but I can't seem to make it take affect (I tried clicking OK but its under the Style Names, so thats probably not it.
Please advise.
A: You should click "Edit Individual Styles" button.
On the 'Item Styles' tab click "Add style" button.
Set itemBackColor and click "OK" button.
Select the item you want to change the style for and assign new style for it. Go to Item Parameters window 'Item style' field.
var itemStyles = [
["itemBackColor=#EB2999,#590937"], //style0
];
var menuItems = [
["Home","testlink.html", "", "", "", "", "", "", "", "", "", ],
["Product Info","", "default.files/icon1.gif", "default.files/icon1o.gif", "", "", "0", "", "", "", "", ], //style0