Calling menu from a cgi?

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
RichGags
Beginner
Beginner
Posts: 6
Joined: Mon Dec 08, 2003 10:50 pm

Calling menu from a cgi?

Post by RichGags »

I have a website with the Milonic Menu working just fine located at:

http://www.jimmydee.com/index2.html

Im trying to set up a shopping cart (AgoraCart), but the menu is not working because it is being called from a cgi. You can see the store (which is under construction) at:

http://www.jimmydee.com/cgi-bin/agora/store/agora.cgi

My question/problem is... Im getting a ns4 undefined error.
When calling the menu from within a cgi, do I have to do anything different?

I put the 4 menu files, in every directory, so I know its not a file not found type of thing....

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

Post by John »

First, a serious problem. You have removed all comments and the copyright statements from the beginning of the code files. From those comments...
All Copyright statements must always remain in place in all files at all times
******* PLEASE NOTE: THIS IS NOT FREE SOFTWARE, IT MUST BE LICENSED FOR ALL USE *******
This removal is a violation of the license terms. Also, with the statements missing we have no way of knowing what RC you are running, your license number, etc.

Please replace all statements per the license terms, come back when it's done, and we'll go from there.
John
RichGags
Beginner
Beginner
Posts: 6
Joined: Mon Dec 08, 2003 10:50 pm

Post by RichGags »

Sorry about that. I didnt realize that was required. The licencing info has been replaced and my licence number is listed now.
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

One of the most important reasons we asked that copyright info remain in place is so that we can see which version you are using.

Without this information it's virtually impossible for us to provide support for the menu. Chances are, if there is a bug, it's probably been fixed in a later version but without knowing the version number of your copy makes our life even more complicated :D

Anyway, on to your problem. All you need to do is change the location of your menu files and you do this wth just one character.

Where you have: <SCRIPT language=JavaScript src="milonic_src.js" type=text/javascript></SCRIPT> you add a / before the file name.

For instance, you have:

Code: Select all

<SCRIPT language=JavaScript src="milonic_src.js" type=text/javascript></SCRIPT>	
<script	language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");		
  else _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>"); 
</script>
<SCRIPT language=JavaScript src="menu_data.js" type=text/javascript></SCRIPT>
If you change this to

Code: Select all

<SCRIPT language=JavaScript src="/milonic_src.js" type=text/javascript></SCRIPT>	
<script	language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=/mmenuns4.js><\/scr"+"ipt>");		
  else _d.write("<scr"+"ipt language=JavaScript src=/mmenudom.js><\/scr"+"ipt>"); 
</script>
<SCRIPT language=JavaScript src="/menu_data.js" type=text/javascript></SCRIPT>
It will all start working because it will now know to look at the root of your website for the menu files.

Cheers
Andy
RichGags
Beginner
Beginner
Posts: 6
Joined: Mon Dec 08, 2003 10:50 pm

Post by RichGags »

Works perfectly now! Thanks a million!
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Just a thank you for your quick response to my request, RG. Since Andy has already answered you, I'll just go back to sleep...
John
Post Reply