Recent Questions
Q: We want the javascript dhtml drop down menu which have sub menu to have a arrow, so that the visitor know that they have to cliek there. We have put in arrow on the tab which are having drop downs, but on mouse over to the single javascript dhtml drop down menu also it is showing the arrow and another problem is that when the drop down is used then there after the arrow is no more visible.
A: You can create Individual XP Style and use it for items with submenus:
var tXPExpandBtn=["left.files/blank-arrow.gif","left.files/blank-arrow.gif", "left.files/blank-arrow.gif","left.files/blank-arrow.gif"];
var tXPStyles = [
["tXPExpandBtn=left.files/menu-arrow.gif,left.files/menu-arrow.gif, left.files/menu-arrow01.gif,left.files/menu-arrow01.gif"],
];
and assign this style for all top items with submenus:
["+Company Profile","", "", "", "", "", "", "0", "0", "", ], //style0
["|Item 25","", "", "", "", "", "", "1", "", "", ],
["|Item 26","", "", "", "", "", "", "1", "", "", ],
["+Projects","", "", "", "", "", "", "0", "0", "", ], //style0
["|Item 27","", "", "", "", "", "", "1", "", "", ],
["|Item 28","", "", "", "", "", "", "1", "", "", ],
["+Services","", "", "", "", "", "", "0", "0", "", ], //style0
Try that.
Q: How can we add a css horizontal dropdown menu separator? I’ve tried the following code but it only adds a menu item with the text “|-“ which is unselectable.
dm_ext_addItem(0, 1, ["|-"])
A: You should add separator without "|" symbol:
dm_ext_addItem(0, 1, ["-"], 1);
Q: I was wondering if you could help me. I have recently done a site and put a menu into the site
The basic javascript menu is on the top of the screen but it has lines through each of the menus just after the words and before the arrow on each of them. I have stretched the menu out to cover the whole of the top of the page but i need to get these lines out of the menu.
Can you please help me with this problem?
A: See images in Vista Templates have the fixed width and height (92 x 21):
var itemStyles = [
["itemWidth=92px","itemHeight=21px","itemBackColor=transparent,transparent","itemBorderWidth=0","fontStyle=normal 11pxTahoma","fontColor=#3A3A3A,#000000","itemBackImage=data-vista-2-04.files/btn_olive.gif,data-vista-2-04.files/btn_white.gif"],
];
When items text is too long you can have such effect.
You can try to use combined background for your items, for example:
var beforeItemImage = [,]; //left-side image for normal and mouse over state
var itemBackImage = [,]; //background or image for normal and mouse over state
var afterItemImage = [,]; //right-side image for normal and mouse over state
var beforeItemImageW = '';
var afterItemImageW = '';
var beforeItemImageH = '';
var afterItemImageH ='';
But you should create a small images in any Graph Editor, for example:
button_n_back.gif
button_n_left.gif
button_n_right.gif
button_o_back.gif
button_o_left.gif
button_o_right.gif
Q: We recently bought your product.
We are developing in ASP.NET (VB) and we have a problem making you deluxe menu dynamic to suit our needs. We are using the Deluxe Menu.
The problem is each time a page with dhtml nav loads, we want to be able to generate the menuItems variable to reflect the options the individual user has, so it can't be hard coded into data.js it MUST be provided by an aspx file and attached somehow. I can't work out how to attach the variable (even a static one) as a separate file, so if you can do it with a static one, we can extend it to a dynamic one later.
For example the JS in the data.js file we want the MenuItem dimension you be loaded in a seperate file, some kind of include.
var menuItems = [
["Home","index.aspx", "", "", "", "_self", "", "", "", "", "", ],
["About","about.aspx", "", "", "", "_self", "", "", "", "", "", ],
["Contact","contact.aspx", "", "", "", "_self", "", "", "", "", "", ],
["Help","", "", "", "", "", "", "", "", "", "", ],
["|HowTo Register","RegHelp.aspx", "", "", "", "_self", "", "", "", "", "", ],
["|FAQ","FAQ.aspx", "", "", "", "_self", "", "", "", "", "", ],
["|Dos 'n' Don'ts","DoDont.aspx", "", "", "", "_self", "", "", "", "", "", ],
["|Workshop","workshop.aspx", "", "", "", "_self", "", "", "", "", "", ],
["Gold Run","", "", "", "", "_self", "", "", "", "", "", ],
["|About Goldrun","goldrunAbout.aspx", "", "", "", "_self", "", "", "", "", "", ],
["|Veiw Sites","GoldDistribSites.aspx", "", "", "", "_self", "", "", "", "", "", ],
["My Run","", "", "", "", "", "", "", "", "", "", ],
["|About","aboutmyrun.aspx", "", "", "", "_self", "", "", "", "", "", ],
["TICs","", "", "", "", "", "", "", "", "", "", ],
["|About","abouttics.aspx", "", "", "", "_self", "", "", "", "", "", ],
["Metro","", "", "", "", "", "", "", "", "", "", ],
["|About","aboutmetro.aspx", "", "", "", "_self", "", "", "", "", "", ],
["Distribution","", "", "", "", "", "", "", "", "", "", ],
["|About","DistribAbout.aspx", "", "", "", "_self", "", "", "", "", "", ],
["|Status","DistribStatus.aspx", "", "", "", "_self", "", "", "", "", "", ],
["|News","DistribNews.aspx", "", "", "", "_self", "", "", "", "", "", ],
["|Display Units","DistribDisplay.aspx", "", "", "", "_self", "", "", "", "", "", ],
["|Team","", "", "", "", "_self", "", "", "", "", "", ],
["|View Sites","DistribSites.aspx", "", "", "", "_self", "", "", "", "", "", ],
["|TIC Budget","", "", "", "", "_self", "", "", "", "", "", ],
];
Hope this makes sense.
A: You can move
var menuItems = [
...
];
dm_init();
dhtml nav code from your data file to your page (template) directly:
<script>
var menuItems = [
...
];
dm_init();
</script>