Recent Questions Javascript Treeview Menu 2010
Q: Could you also tell me where I should place the images I wish to use in the menu, eg arrows. When I select an image to use they are not appearing in the preview, or when I launch deluxe-menu.html?
A: Please, check images paths within data .js file.
For example, if you have data.js file here:
c:/website/data.js
and your images are stored here:
c:/website/images/
you should set image name so (for example):
var arrowImageMain = ["images/arrow1.gif", "images/arrow2.gif"];
If you use Tuner, you should save data .js file before you'll selectimages. When you save .js file it means that you set a root directoryfor the project, so Tuner can make all selected images with relativepaths.
Q: We are experimenting with your library but can't seem to make it work. I am getting "d_ddm is undefined" in dmenu_popup.js menu script.
Could you tell me what we are doing wrong?
A: You should change
onClick="return dm_popup(1, 500, event);
to
onClick="return dm_popup(0, 500, event);
If you have only one menu on the page your menuInd = 0;
Q: I am totally confused by this now but I have 2 data files - one for a menu bar going horizontal and one going vertical both containing the same information. But even though the content is the same, the layout is different.
You will see that on the horizontal menu,
Fleet
Financce
CPC Cards
Cashire
These are listed correctly under each other but on the vertical one, the layout differs.
A: You should write your parameters more carefully.
See, now you have
menuItems = [
["About us","javascript:alert('Coming Soon')", , , ,"" ,0 , , , ],
["|||Organisation Chart","javascript:alert('Coming Soon')", , , ,"" ,1, , , ],
First you have the 1-st level of menu items then at once 4-th. It isnot right. You should write the number of your Individual Style in ""also.
See, how you should write your menuItems:
menuItems = [
["About us","javascript:alert('Coming Soon')", , , ,"" ,"0" , , , ],
["|Organisation Chart","javascript:alert('Coming Soon')", , , ,"","1", , , ],
["|Who's Who?","/k6intranet2.nsf/PageTitleLookup/Who's Who?OpenDocument", , , ,"" ,"1", , , ],
["|Contact Details","javascript:alert('Coming Soon')", , , ,"" ,"1", , , ],
["How To?","javascript:alert('Coming Soon')", , , ,"" ,"0", , , ],
["|Fleet","javascript:alert('Coming Soon')", , , ,"" ,"1", , , ],
["||Hire a Vehicle","/k6intranet2.nsf/PageTitleLookup/Hire a Vehicle?OpenDocument", , , ,"" ,"1", , , ],
["||Report an Accident","/k6intranet2.nsf/PageTitleLookup/How to report an accident?OpenDocument", , , ,"" ,"1", , , ],
["||Report a Breakdown","/k6intranet2.nsf/PageTitleLookup/Report a Breakdown?OpenDocument", , , ,"" ,"1", , , ],
["|Finance Admin","javascript:alert('Coming Soon')", , , ,"" ,"1", , , ],
["||Capitalise an Asset","/k6intranet2.nsf/PageTitleLookup/capitalise an asset?OpenDocument", , , ,"" ,"1", , , ],
["||Pay your Personal Calls on Mobile Phone Bills","/k6intranet2.nsf/PageTitleLookup/Pay your personal calls on mobile phone bills?OpenDocument", , , ,"" ,"1", , , ],
["||Request a credit to be raised","javascript:alert('Coming Soon')", , , ,"" ,"1", , , ],
["|CPC Cards","javascript:alert('Coming Soon')", , , ,"" ,"1", , , ],
["||Request a new CPC user","/k6intranet2.nsf/PageTitleLookup/request a new cpc user?OpenDocument", , , ,"" ,"1", , , ],
["||Report a Lost/Stolen CPC Card","/k6intranet2.nsf/PageTitleLookup/Report a lost or stolen card?OpenDocument", , , ,"" ,"1", , , ],
["||Enquire about a general CPC query","/k6intranet2.nsf/PageTitleLookup/enquire about a general cpc query?OpenDocument", , , ,"" ,"1", , , ],
["|Cashier","javascript:alert('Coming Soon')", , , ,"" ,"1", , , ],
["||Request a Cashbook Manual Payment","/k6intranet2.nsf/PageTitleLookup/Request a Cashbook Manual Payment?OpenDocument", , , ,"" ,"1", , , ],
["||Request a Cashbook BACS Payment","/k6intranet2.nsf/PageTitleLookup/Request a cashbook Bacs payment?OpenDocument", , , ,"" ,"1", , , ],
["Useful Information","javascript:alert('Coming Soon')", , , ,"" ,"0" , , , ],
["|Month End Timetable 2007","javascript:alert('Coming Soon')", , , ,"" ,"1", , , ],
["|Month End Year to Date Results","javascript:alert('Coming Soon')", , , ,"" ,"1", , , ],
["||Coming Soon...","javascript:alert('Coming Soon')", , , ,"" ,"1", , , ],
["Finance Focus","javascript:alert('Coming Soon')", , , ,"" ,"0" , , , ],
["|Coming Soon...","javascript:alert('Coming Soon')", , , ,"" ,"1", , , ],
["Coming Soon","javascript:alert('Coming Soon')", , , ,"" ,"0", , , ],
];
dm_init();
Q: What setting do I use for dmAJAXCount in my java menu navigation?
A: That variable sets the maximal number of submenus that will be loadedfrom server on your page.