Separate files?

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Celtic
Beginner
Beginner
Posts: 1
Joined: Thu Jul 24, 2003 8:42 am
Location: Stalybridge
Contact:

Separate files?

Post by Celtic »

Not knowing JavaScript as well as I will eventually, I'll have to ask this question now:

Is it possible to have the sub-menus in separate files?

The reason that I ask, is that I want to have those menus that change more frequently separated out from the static menus. I don't have SQL access from my ISP to build the menus dynamically, and it would save me a lot of time.

Iain.
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi Iain,

It seems to me that since the submenus are simply defined with javascript, you should be able to break their definitions into multiple .js files that you source into your pages. Just be careful not to duplicate menu names across files that are to be used in the same page, or you'll probably find that one gets lost.

Kevin
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Guess I don't understand what difference it would make which file(s) the subs are in. One way or another, you have to edit. Seems to me you'd be asking for trouble by breaking things up - just one more thing that could go wrong.
John
Post Reply