View Full Version : Menu from external file without SSI/PHP

03-13-2005, 06:20 PM
The menu I have on the site listed below has a menu that will be come very long because I will have over 100 items listed in several of the sections.
URL Removed by moderator. Note: In the future if you will be linking to a site of adult content, post code instead of a link.... I will be working on limiting the length and adding a scrollbar at a later time.

Because the menu will be getting so large, I don't what the menu code in the html. I would like to be able to update the menu without updating every page that the menu is present on (hundreds). Unfortunately, my server host does not allow SSI/PHP.

I am a definite newbie here so I did a search through the threads and found the following:CF Thread (http://www.codingforums.com/showthread.php?t=40247) but I couldn't get it to work for me.

How can I get my menu to load from an external file that I can update daily without pulling my hair out?

The menu is based upon this example, so if you want the code I used, I suggest using the code shown there. It's smaller and not as customized as mine.Collapsable Vertical Tree Script (http://simplythebest.net/scripts/DHTML_scripts/dhtml_script_15.html)

I would appreciate any help you can give.


03-13-2005, 06:38 PM
Does your ISP support perl? It possible that you could have something suitable written in it.


03-13-2005, 06:46 PM
I don't know. I will find out.

03-13-2005, 07:51 PM
Nope. No perl allowed.

03-13-2005, 07:53 PM
Even if the menu itself is in the main HTML, that would be fine. Perhaps there is a way to just get the various lists from another file? I guess that isn't possible without SSI?

03-13-2005, 08:37 PM
Sounds to me like they're stretching the term service provider :) Maybe its time to move to another?


03-13-2005, 08:49 PM
I can't. They are not only the providers of the server, they are also the providers of the content I am trying to sell. Need to be with them if I want to use their content.

On another matter, any ideas about the menu problem I am having?

03-13-2005, 08:51 PM
Slap this where you have your links now.

<script language="javascript" type="text/javascript" src="http://YOUR URL/link.js"></script>

your link.js file

document.write('Everything between the ' ' is written like noraml HTML. You can just move all your links into them.');

03-13-2005, 09:20 PM
Am I supposed to use Single quotes or Double quotes? This Thread (http://www.codingforums.com/showthread.php?t=40247) says to use Double, but you are showing single. I used double quotes when I tried before, could that be why it didn't work for me?

03-13-2005, 09:25 PM
I used single quotes in this file:


and it works fine.

Not sure about the double quotes.

03-13-2005, 10:03 PM
:) :) :) :) :) :) :) :D :D :D

Happy happy Joy joy. Thank you for that HarbingerOTV. That was exactly what I needed. The Double-quotes were messing everything up.