Keeping Menu Parameters out of the HTML

Please note that official support for this menu version has now ceased. There are still plenty of users, though, and the forum is still running. Some of our long-time users may be able to help you out.
Post Reply
gnevius
Beginner
Beginner
Posts: 5
Joined: Thu Aug 01, 2002 8:31 pm

Keeping Menu Parameters out of the HTML

Post by gnevius »

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
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

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?
John
gnevius
Beginner
Beginner
Posts: 5
Joined: Thu Aug 01, 2002 8:31 pm

Keeping Menu Parameters out of the HTML

Post by gnevius »

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
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Hi Greg -

OK, got it.

The first problem I see is this. You have...

Code: Select all

dumpmenus(); 

</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: Select all

<script language="Javascript" src="menu_array.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:
John
gnevius
Beginner
Beginner
Posts: 5
Joined: Thu Aug 01, 2002 8:31 pm

Post by gnevius »

John,
Thanks for all of your help. I finally got it!!!
Take care, I appreciate your support!
Regards,
Greg
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Greg -

Great - glad to hear it :!:

I think you'll find most of the folks around here to be helpful. It's Andy's fault - he's so d--n helpful himself it just rubs off :D
John
Post Reply