|
|
I need beforeItemImage or afterItemImage for the top menu in javascript..
Return to Recent Questions
Q:
I know. I have two menus on the page and I am not using beforeItemImage or
afterItemImage 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!
Return to Recent Questions
Related:
- Aug 28, 2006 - Top menu in a 6x4 cell layout (effectively a rectangle)
- Sep 02, 2006 - Can I show / hide the javascript floating menu .
- Sep 02, 2006 - Little vertical spacers between menu items in the drop down menu.
- Sep 05, 2006 - Can I say to deluxe-menu "use wrapping"?
- Sep 05, 2006 - Change cursor to a hand when over a menu link...
- Sep 06, 2006 - The alighment of the dropdown menu is off to the right in Firefox...
- Sep 06, 2006 - The Items of the javascript tree view stay expanded in the same state.
- Sep 06, 2006 - Can't see my javascript vertical tree menu in FireFox.
- Sep 11, 2006 - How can I hide my dropdown menu on print?
- Sep 11, 2006 - If I use doctype the settings of the submenus in javascript dropdown menu get lost.
- Sep 15, 2006 - Are vertical menus also supported? I don't see any in the javascript menu examples.
|