|
|
The problem is each time a page with dhtml nav loads, we want to be able to generate the menuItems variable to reflect the options the individual user has..
Return to Recent Questions
Q:
We recently bought your product.
We are developing in ASP.NET (VB) and we have a problem making you deluxe menu dynamic
to suit our needs. We are using the Deluxe Menu.
The problem is each time a page with dhtml nav loads, we want to be able to generate the menuItems
variable to reflect the options the individual user has, so it can't be hard coded into
data.js it MUST be provided by an aspx file and attached somehow. I can't work out how
to attach the variable (even a static one) as a separate file, so if you can do it with
a static one, we can extend it to a dynamic one later.
For example the JS in the data.js file we want the MenuItem dimension you be loaded in a seperate file, some kind of include.
var menuItems = [
["Home","index.aspx", "", "", "", "_self", "", "", "", "", "", ],
["About","about.aspx", "", "", "", "_self", "", "", "", "", "", ],
["Contact","contact.aspx", "", "", "", "_self", "", "", "", "", "", ],
["Help","", "", "", "", "", "", "", "", "", "", ],
["|HowTo Register","RegHelp.aspx", "", "", "", "_self", "", "", "", "", "", ],
["|FAQ","FAQ.aspx", "", "", "", "_self", "", "", "", "", "", ],
["|Dos 'n' Don'ts","DoDont.aspx", "", "", "", "_self", "", "", "", "", "", ],
["|Workshop","workshop.aspx", "", "", "", "_self", "", "", "", "", "", ],
["Gold Run","", "", "", "", "_self", "", "", "", "", "", ],
["|About Goldrun","goldrunAbout.aspx", "", "", "", "_self", "", "", "", "", "", ],
["|Veiw Sites","GoldDistribSites.aspx", "", "", "", "_self", "", "", "", "", "", ],
["My Run","", "", "", "", "", "", "", "", "", "", ],
["|About","aboutmyrun.aspx", "", "", "", "_self", "", "", "", "", "", ],
["TICs","", "", "", "", "", "", "", "", "", "", ],
["|About","abouttics.aspx", "", "", "", "_self", "", "", "", "", "", ],
["Metro","", "", "", "", "", "", "", "", "", "", ],
["|About","aboutmetro.aspx", "", "", "", "_self", "", "", "", "", "", ],
["Distribution","", "", "", "", "", "", "", "", "", "", ],
["|About","DistribAbout.aspx", "", "", "", "_self", "", "", "", "", "", ],
["|Status","DistribStatus.aspx", "", "", "", "_self", "", "", "", "", "", ],
["|News","DistribNews.aspx", "", "", "", "_self", "", "", "", "", "", ],
["|Display Units","DistribDisplay.aspx", "", "", "", "_self", "", "", "", "", "", ],
["|Team","", "", "", "", "_self", "", "", "", "", "", ],
["|View Sites","DistribSites.aspx", "", "", "", "_self", "", "", "", "", "", ],
["|TIC Budget","", "", "", "", "_self", "", "", "", "", "", ],
];
Hope this makes sense.
A:
You can move
var menuItems = [
...
];
dm_init();
dhtml nav code from your data file to your page (template) directly:
<script>
var menuItems = [
...
];
dm_init();
</script>
Return to Recent Questions
Related:
- Sep 05, 2006 - Change cursor to a hand when over a menu link...
- Oct 03, 2006 - Do I have the ability to change colors for the menus and the sub menus in the cascade menu.
- Nov 03, 2006 - I want to use a Flash icon with sound next to the menu items in javascript list menu...
- Nov 26, 2006 - How to keep my floating html menu in the centre of the page like <centre></centre>
- Dec 04, 2006 - With the licensed .js files of menu dhtml the status bar on IE shows "Error on page".
- Dec 14, 2006 - Images of HTML Menu still showing up as blank in the preview screen...
- Dec 30, 2006 - Can I create the following menu with your javascript menu sample code?
- Jan 17, 2007 - I have small problems with your javascript menu system
- Feb 02, 2007 - The background images for dhtml drop down menus are missing in the browser
- Feb 11, 2007 - Is it possible for the dhtml sliding menu to highlight selected item on the page?
- Feb 19, 2007 - I'm having several questions regarding your javascript mouse over popup menu
|