|
|
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 02, 2006 - Little vertical spacers between menu items in the drop down menu.
- Sep 29, 2006 - Is it possible to use an external file in the java drop down menu?
- Oct 01, 2006 - All of the items in html pull down menu are different sizes.
- 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.
- Oct 31, 2006 - Is it possible to use the AXAJ-Like technology and Javascript-API in css pop up menu?
- Nov 25, 2006 - I need only one column of submenu html to be displayed, all other columns should be closed.
- 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?
|