Recent QuestionsQ: Is it possible to insert an item at the top of the submenu in the popup menu?
A: To insert item in the specific position you should use thefollowing function:
function dm_ext_addItemPos (menuInd, submenuInd, iParams, Pos)
Q: I 've faced problem in new version v3 of dhtml menu generator.
The problem is visualization of cyrillic fonts I took my js file - just edited it ( adding one menu item) and saved.
I think it's not just browser problem because if reopen js in deluxe menu we can see unreadable text. There are no such problems in V2.4.
A: Yes, this problem was fixed in the new version of dhtml menu generator.
Download the new version from the same link in your license messageand install it.
You should use UTF-8 encoding in that case.
I just want to use the API to change the icon on the menu items.
A: You should use the following function:
function dm_ext_changeItem (menuInd, submenuInd, itemInd, iParams)
dm_ext_changeItem(0, 0, 1, ["", "", "new_icon.gif", "new_icon_o.gif", "",,""]);
Q: I purchased your menu and I am currently using it. I was trying to use the vista template with the images. Yet when I have an js dropdown menu item that is a little long in text the image breaks in to two buttons. Is there a way to fix this or is that just the way it is with these templates?
A: Images in Vista Templates have the fixed width and height (92 x21):
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: