Back To Start Of Archive
Taken From The Forum: Archived Topics for the old Version 3.0 JavaScript Menu
Forum Topic: Click to view post
Last Updated: Wednesday July 18 2012 - 06:07:29
Keeping Menu Parameters out of the HTML
Poster: gnevius
Dated: Thursday August 1 2002 - 20:37:26 BST
Hello Folks,
I am working with the menu system and I am wondering instead of having the menu parameters inside my html, can I just have the same parameters for formatting of the menus only in the mmenu_array.js? I really would like to streamline my HTML docs and keep them free of all this code and if I can draw from the .js file for formatting, that would be great. I have done this before with another menu system, but could not figure out how to add sub-menus, so I am trying this menu system instead.
Thank a lot for any help that you may offer.
Cheers!
Greg
Poster: John
Dated: Thursday August 1 2002 - 22:16:08 BST
Hi Greg -
What exactly do you have in the HTML? You should be able to do everything right in the array.
Got a URL handy?
Keeping Menu Parameters out of the HTML
Poster: gnevius
Dated: Friday August 2 2002 - 3:27:37 BST
John,
Thanks for your response. In my html document, I have the code from ////////////////////////////////////
// Editable properties START here //
////////////////////////////////////
down to the end where the code ends like this:
dumpmenus();
</script>
I would like to keep this code out of my document and call it from the mmenu_aray.js file only, but when I remove all of that code, I get an error. Can't figure out where I am going wrong.
Thanks for your time,
Greg
Poster: John
Dated: Friday August 2 2002 - 16:34:59 BST
Hi Greg -
OK, got it.
The first problem I see is this. You have...
Code:
dumpmenus();
</script>
</script>
Get that </script> out of there The array should end with just a dumpmenus() (note no ';').
Call everything from your HTML page(s) like this...
Code:
<script language="Javascript" src="menu_array.js" type="text/javascript"></script>
<script language="Javascript" src="mmenu.js" type="text/javascript"></script>
<script language="Javascript" src="mmenu.js" type="text/javascript"></script>
Put that inside the <head></head>.
Dat's all der is - ain't no mo' :mrgreen: