Recent Questions
Q: Is it possible to put an enter in a drop down menu item?
Like can I split Login newspaper to login (enter) newspaper
"Login
newspaper"
A: You can use any html code within menuItems.
Use
tag to wrap your text.
["login <br> newspaper","","","","","","",""]
Q: Actually I think we've managed to figure most of the below out, so I'd be grateful if you could give us some pointers with the following instead...
How might we be able to include your javascript menu scripts within e.g. asp tags? We'd like some menu options to be hidden from some users, but I'm getting errors when I put asp tags in your data.js file.
A: It seems to me that you have syntactical error in your code.
Please, check that you don't have double quotes in your code. If you have several quotes you shoulduse back slashes before them, for example:
<%
response.Write( " ['|Test A','javascript:alert(\'Test\');', '', '', '', '', '0', '-1', '', ], " )
%>
["|Loan Profile","../pipeline/loan_profile.asp?id=<%=rsLoans('loan_id')%>", "", "","", "", "", "2"],
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!
Q: I tried the following for subitem and it worked but not working with the "Title item" (Group or header item), is there a way to process onclick for the title item? Thanks again.
You're able to use Javascript for each item, for example:
var tmenuitems = [
["item text", "javascript:your_code_here"]
];
A: Unfortunately, title items doesn't allow to use Javascript in the sameway.
But you can do the following:
var tmenuitems = [
["<div onclick='your_code_here'>title text</div>"]
];