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: Thursday February 8 2018 - 06:02:18

Cut and pasting vertical menu


Poster: tubize
Dated: Friday November 28 2003 - 14:01:17 GMT

I have a weird situation and it has been cleared up in the past through trial and error but I think it is time I find out what is happening.

I have a vertical menu working in a directory of my site and want to set up another file in a different directory that uses a similar vertical nav. If I set up the include in the second file to bring in the old vertical menu from the first file, it works perfectly.

For example, I am in busdirectory/newadmin/index.cfm and I bring in the menu with this code:
<SCRIPT src="/club/awcb/navigation/nav_admin.cfm" language="javascript"></SCRIPT>
The menu comes up perfectly but when I copy the exact menu file from the first directory to the second directory and try to bring the menu in with this code:
<SCRIPT src="/busdirectory/newadmin/nav_admin.cfm" language="javascript"></SCRIPT>, I get an error message every time and the menu does not display. I don't get anything from the error message because it mentions a line that is higher than the lines I have in either file.


Poster: John
Dated: Friday November 28 2003 - 18:01:35 GMT

Is nav_admin.cfm your menu data file? If so, I'd use a <cfinclude> rather than the <script>. I think it's actually not a script to CF because of your .cfm suffix on the file.

I have mine set up like this...

Nav_Standard.cfm...

Code: Select all

<script language="JavaScript" src="/sai/templates/menu5/milonic_src.js" type="text/javascript"></script>   
<script language="JavaScript" type="text/javascript">
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=/sai/templates/menu5/mmenuns4.js><\/scr"+"ipt>");      
else _d.write("<scr"+"ipt language=JavaScript src=/sai/templates/menu5/mmenudom.js><\/scr"+"ipt>");</script>
<script language="JavaScript" src="/sai/templates/menu5/xp_data.cfm" type="text/javascript"></script>

That is called from inside the <head> with a <cfinclude> where needed.

Why would that matter?


Poster: tubize
Dated: Friday November 28 2003 - 18:11:24 GMT

John,
Thanks for your prompt reply. I haven't tried your suggestion but do not know why it would make a difference because the javascript include works throughout the site in calling up my cfm milonic menu.

In this case, the only thing different is the directory that I am calling the file from. It calls it from one directory okay but not from the other directory;


Poster: John
Dated: Friday November 28 2003 - 18:21:00 GMT

I see you're using server-relative addressing (which is great). No offense, but I must ask - is the failing path correct? I've managed some pretty good boners on my sites by starting the path in the wrong place (dropping a directory, etc.).