|
|
What I would like to see is the ability to have a base site navigation menu but all the menuitems be called from an Ajax file.
Return to Recent Questions
Q:
What I would like to see is the ability to have a base site navigation menu with all the definitional entries (size, locations, icons, etc.) defined but all the menuitems be called from an Ajax file.
A:
You cannot use ajax submenus for the top items.
But you can use several .js file, for example:
params.js //file with all menu parameters (size, locations, icons, etc.)
all code before
var menuItems = [
...
];
dm_init();
data_ajax1.js //data files for ajax submenus
data_ajax2.js
data_ajax3.js
...
main_data.js - data file with the following code:
var menuItems = [
["Item 1","", "", "", "", "", "0", "0", "data_ajax1.js", "", "", ],
["Item 2","", "", "", "", "", "0", "0", "data_ajax2.js", "", "", ],
["Item 3","", "", "", "", "", "0", "0", "data_ajax3.js", "", "", ],
["Item 4","", "", "", "", "", "0", "0", "data_ajax4.js", "", "", ],
];
dm_init();
You can also place this code into your html page directly (in the place where you want to
have a menu):
<script type="text/javascript">
var menuItems = [
["Item 1","", "", "", "", "", "0", "0", "data_ajax1.js", "", "", ],
["Item 2","", "", "", "", "", "0", "0", "data_ajax2.js", "", "", ],
["Item 3","", "", "", "", "", "0", "0", "data_ajax3.js", "", "", ],
["Item 4","", "", "", "", "", "0", "0", "data_ajax4.js", "", "", ],
];
dm_init();
Return to Recent Questions
Related:
- Sep 29, 2006 - Is it possible to use an external file in the java drop down menu?
- Oct 01, 2006 - When I click on link of my vertical drop down menu no file is loaded!?
- Oct 06, 2006 - Where I can find data.js file for tree javascript menu?
- Oct 21, 2006 - I want to get the URL or file name to be open in javascript mouseover menu by click...
- Oct 30, 2006 - I don't see on my website dhtml mouseover menu that I saw on my local machine.
- Dec 04, 2006 - With the licensed .js files of menu dhtml the status bar on IE shows "Error on page".
- Dec 11, 2006 - How to add the new items to the dhtml vertical menu without using two data.js files?
- Dec 15, 2006 - I can't seem to have a "contact us" menu item to work in the html navigation menu.
- Jan 03, 2007 - In the horizontal drop down menu my html files still open in a new window.
- Jan 06, 2007 - Do I need to replace all the files and script in all the web pages with hover menu...?
- Jan 07, 2007 - I can't install my javascript mouseover menu on the page made with Yahoo sitebuilder
|