Recent Questions
Q: Is there a javascript function I can call to switch from one tab to the next in the javascript jump menu?
A: You can use the following function:
dtabs_itemClick(menuInd,itemInd);
menuInd - index of the javascript jump menu on your page (>= 0)
itemInd - index of the item you want to open (>= 0)
Q: 1) is it possible to have multiple(different) images, popup menus?
2) Can it Automatically popup instead of Left click?
Would you show me How?
3) What is: menuInd - index of the javascript menu script on a page, >= 0 ?
Could you give more explanation?
A: > 1) is it possible to have multiple(different) images, popup menus?
Yes, you can use any number of popup menus on your page.
> 2) Can it Automatically popup instead of Left click?
> Would you show me How?
You can use onMouseOver event instead of onClick or onContextMenu events in that case.
> 3) What is: menuInd - index of the javascript menu script on a page, >= 0 ?
Each menu has ID. The ID's number starts with 0.
So, when you have several data files on your page you have such ID's:
<script type="text/javascript" language="JavaScript1.2" src="menu-top.js"></script> // ID - 0 //standard menu (doesn't use popup feature)
<script type="text/javascript" language="JavaScript1.2" src="source_pop.js"></script> // ID - 1
<script type="text/javascript" language="JavaScript1.2" src="source_pop1.js"></script> // ID - 2
<script type="text/javascript" language="JavaScript1.2" src="source_pop2.js"></script> // ID - 3
<script type="text/javascript" language="JavaScript1.2" src="source_pop3.js"></script> // ID - 4
and so on.
If you want to have different Popup menus (there color, item, text,font and so on) you should create different .js files with yourparameters. And call them from your page, for example:
<script type="text/javascript" language="JavaScript1.2" src="menu-top.js"></script>
<SCRIPT language=JavaScript1.2 src="source_pop.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript1.2 src="source_pop1.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript1.2 src="source_pop2.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript1.2 src="source_pop3.js" type=text/javascript></SCRIPT>
If you have different item text only you can use one
<SCRIPT language=JavaScript1.2 src="source_pop.js" type=text/javascript></SCRIPT>
file. But you should delete the following code:
var menuItems = [
["Next","testlink.htm"],
["Prev","testlink.htm"],
["Close","testlink.htm"],
];
dm_init();
and move it to the html page:
<body>
...
<SCRIPT language=JavaScript1.2 src="source_pop.js" type=text/javascript></SCRIPT>
<script type="text/javascript"> //first popup menu ID - 1
var menuItems = [
["Next","testlink.htm"],
["Prev","testlink.htm"],
["Close","testlink.htm"],
];
dm_init();
</SCRIPT>
<script type="text/javascript"> //second popup menu ID - 2
var menuItems = [
["Text","testlink.htm"],
["Text1","testlink.htm"],
["Text2","testlink.htm"],
];
dm_init();
</SCRIPT>
<script type="text/javascript"> //third popup menu ID - 3
var menuItems = [
["New_Text","testlink.htm"],
["New_Text1","testlink.htm"],
["New_Text2","testlink.htm"],
];
dm_init();
</SCRIPT>
<script type="text/javascript"> //fourth popup menu ID - 4
var menuItems = [
["New","testlink.htm"],
["New","testlink.htm"],
["New","testlink.htm"],
];
dm_init();
</SCRIPT>
<img src="testimage.gif" width=200 onClick="return dm_popup(1, 1000, event);" style="cursor: hand;">
<img src="testimage.gif" width=200 onClick="return dm_popup(2, 1000, event);" style="cursor: hand;">
<img src="testimage.gif" width=200 onClick="return dm_popup(3, 1000, event);" style="cursor: hand;">
<img src="testimage.gif" width=200 onClick="return dm_popup(4, 1000, event);" style="cursor: hand;">
</body>
Q: Now, I need your help in another question: I can set "tpressedFontColor" to have the font of the active item in the dhtml tree menu take this color.
How can I make the onmouseover - background ("titemBackImage" of the individual style set in the item parameters) of the menu item also be saved in the active, selected dhtml tree menu item? I need to build a menu with different background-images (shown on mouseover and when active) for each item, so I cannot set ONE "titemBackImage" that fits for all.
Thank you very much, Irene. And yes, I really love this product.
A: Unfortunately it is not possible now to set background color orbackground image for the selected state. Deluxe tree doesn't have sucha feature now.
But we'll try to add this feature in the next versions of Deluxe Tree.
Q: I know. I have two menus on the page and I am not using beforeItemImage orafterItemImage for the top menu in javascript (the one you referenced below), but I need it for the second menu. The parameters for that menu are in mainnav_data.js.
Even when I only call dmWorkPath and dmenu.js once, it does not work.
A: See, it is not correctly to use image-based items:
["","", "mainnav_data.files/corpinfo.gif", "mainnav_data.files/corpinfo2.gif", "", "_self", "0", "", "", "", "", ],
and specify beforeItemImage/afterItemImage parameters. They won't work in that case.
You can create such buttons in the following ways:
1) Use image-based menu (images with text).
Create normal and mouse-over state images (with text) for each item:
["","", "mainnav_data.files/corpinfo.gif", "mainnav_data.files/corpinfo2.gif", "", "_self", "", "", "", "", "", ],
["","", "mainnav_data.files/new.gif", "mainnav_data.files/new2.gif", "", "_self", "", "", "", "", "", ],
["","", "mainnav_data.files/xxxxx.gif", "mainnav_data.files/xxxxx2.gif", "", "_self", "", "", "", "", "", ],
2) Use combined background for the menu in javascript items (images without text).
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
You cannot use these two methods together!