Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:21

Using Include with Menu


Poster: steveK
Dated: Friday August 8 2003 - 14:52:58 BST

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


Poster: Ruth
Dated: Monday August 11 2003 - 0:56:41 BST

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


Poster: Hergio
Dated: Monday August 11 2003 - 14:06:04 BST

Before we go farther make sure all your paths are correct, see http://www.milonic.co.uk/menu/forum/viewtopic.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.

Using Include with Menu


Poster: steveK
Dated: Monday August 11 2003 - 14:23:06 BST

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


Poster: Hergio
Dated: Monday August 11 2003 - 14:32:41 BST

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!

Using Include with Menu


Poster: steveK
Dated: Monday August 11 2003 - 14:51:16 BST

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

Re: Using Include with Menu


Poster: John
Dated: Monday August 11 2003 - 19:39:00 BST

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.