Using Include with Menu

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
steveK
Beginner
Beginner
Posts: 3
Joined: Fri Aug 08, 2003 2:34 pm

Using Include with Menu

Post by steveK »

Hi,

I'm just starting to work with the Milonic v5 menu system. It's going well and I think it'll be very useful. I have bumped into one problem so far...

I'm trying to use an Include Page command to help keep updating the site easier. Here are the two pages. http://www.cenational.org/new/indextest.asp and http://www.cenational.org/new/sitemenu/siteMenutest.asp. When I go straight to the included page (siteMenutest.asp) it works fine. When I go to indextest.asp, it pulls in the page, so I know the Include is working, but the menu doesn't show.

I'm using the full path name in siteMenuTest.asp to call the .js files. I'd rather use a relative address, but I can't seem to get that to work with the include either.

I'd appreciate any suggestions.

Thanks,

Steve
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

when I go to the http://www.cenational.org/new/indextest.asp I get an error message which says line 354 char 35 object expected. I tried downloading the page to my puter and doing it and got the same message. I moved all the files into the same folder and everything worked fine...that included the mmenudom.js etc. Also, I notice you don't have a scriptpath declared in the milonic_src.js file. Don't know if any of this is the problem. Also, when I tried to go to the other page you listed I get a page not found.

Ruth
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

Before we go farther make sure all your paths are correct, see http://www.milonic.co.uk/menu/forum/vie ... php?t=2176. Also whats wrong with absolute paths to files? In this case it would be required if you want the menu to be able to be 'plugged' into any page in your site without having to worry where it is.
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
steveK
Beginner
Beginner
Posts: 3
Joined: Fri Aug 08, 2003 2:34 pm

Using Include with Menu

Post by steveK »

Thanks for the reply. That was the problem. I hadn't put in a scriptpath in milonic_src.js. It's working great now when I use the full path http://www.cenational.org/new/siteMenu/

I tried using root and document relative paths, but can't get it to work in more than one directory. (../siteMenu/ or siteMenu/) Do you know if I have to use the full path? This is also the case with the arrow images referenced in table_data.js.

One of the reasons why I decided to go with this menu was because of the help from this board. I really do appreciate it.

Steve
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

Hey thanks for the kind words, there are some really great people helping on this board, its definetly a nice friendly board full of helpers. Answerin' lots of :?: 's!

Back to paths, I believe absolute paths is necessary for what you're doing. If you want this menu to be in an include file, that means that new pages are probably going to get the include file put in them. That means the menu could be accessed from any number of places, and thats where absolute paths are required. That way you dont have to worry about any editting of code...relative paths would destroy the advantage of having an include file.

I dont think absolute paths are really any slower than relative paths, I think they are just shorter and allow you to clean up your code. I betcha even browsers use absolute paths even if you specify a relative path, they just stick the path on the front of what you have and send that back to the server. But I dont know for sure. Best of luck!
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
steveK
Beginner
Beginner
Posts: 3
Joined: Fri Aug 08, 2003 2:34 pm

Using Include with Menu

Post by steveK »

I was trying the relative paths because I'd read somewhere that the they were quicker, but that might not be the case. Either way being able to use the include file for the menu is deffinately worth it in the time it'll save me coding.

Thanks again.

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

Re: Using Include with Menu

Post by John »

steveK wrote:I tried using root and document relative paths, but can't get it to work in more than one directory. (../siteMenu/ or siteMenu/)
What you need is server relative paths, which is neither of the above. There are a number of discussions on the board about this. Use the Search feature.
John
Post Reply