PDA

View Full Version : Jim's Menus v5.7



kergilliack
12-04-2004, 05:43 PM
Firstly, let me say I've not been writing HTML long, and found Jim's Menus just what I wanted. I have recently moved my web hosting from a Windows based server to one running Linux, and my menus did not work (they did not appear on the screen at all). They still work on the Windows host.

I have tried to reduce this problem to its lowest form (I did originally have several sub-levels, which I have removed for simplicity).

I just might have encountered a glitch with the menus, where, by reducing the length of some menu text by just 1 character, they work fine.

First of all, take the link : www.leacottage.net/test/success.htm. This works fine.

Now try : www.leacottage.net/test/failing.htm, and you'll see what I mean.

The HTML is very simple (I am afraid that, to reduce it down to next to nothing, I've even taken out the comment lines to say it's from Dynamic Drive). Take a look at the source code.

The included file success_config is as follows (without the ** lines) :-

*******************************************************
function init()
{
menus[0] = new menu(190, "vertical", 10, 140, -40, -2, "img:images/background1.gif", "img:images/background2.gif", "Verdana, Arial, Helvetica, sans-serif", 8,
"bold", "bold", "white", "white", 4, "white", 2, "rollover:images/tri-right2.gif:images/tri-right2.gif", false, true, true, false,0, false, 4, 4, "black");
menus[0].addItem("", "", 22, "right", "Home", 0);
menus[0].addItem("", "", 22, "right", "History of Budock", 0);
menus[0].addItem("", "", 22, "right", "Parish News", 0);
menus[0].addItem("", "", 22, "right", "Community News", 0);
menus[0].addItem("", "", 22, "right", "What's On Diary", 0);
menus[0].addItem("", "", 22, "right", "Public Facilities", 0);
menus[0].addItem("", "", 22, "right", "Clubs & Associations", 0);
menus[0].addItem("", "", 22, "right", "Local Organisations", 0);
menus[0].addItem("", "", 22, "right", "Churches", 0);
menus[0].addItem("", "", 22, "right", "Schools", 0);
menus[0].addItem("", "", 22, "right", "Local Attractions", 0);
menus[0].addItem("", "", 22, "right", "Directory", 0);
menus[0].addItem("", "", 22, "right", "Advertisement", 0);
}
//OUTER CLOSING BRACKET. EVERYTHING ADDED MUST BE ABOVE THIS LINE.

*******************************************************

The included file failing_config is just 1 character different. The word "Advertisement" is changed to "Advertisements" :-

*******************************************************
function init()
{
menus[0] = new menu(190, "vertical", 10, 140, -40, -2, "img:images/background1.gif", "img:images/background2.gif", "Verdana, Arial, Helvetica, sans-serif", 8,
"bold", "bold", "white", "white", 4, "white", 2, "rollover:images/tri-right2.gif:images/tri-right2.gif", false, true, true, false,0, false, 4, 4, "black");
menus[0].addItem("", "", 22, "right", "Home", 0);
menus[0].addItem("", "", 22, "right", "History of Budock", 0);
menus[0].addItem("", "", 22, "right", "Parish News", 0);
menus[0].addItem("", "", 22, "right", "Community News", 0);
menus[0].addItem("", "", 22, "right", "What's On Diary", 0);
menus[0].addItem("", "", 22, "right", "Public Facilities", 0);
menus[0].addItem("", "", 22, "right", "Clubs & Associations", 0);
menus[0].addItem("", "", 22, "right", "Local Organisations", 0);
menus[0].addItem("", "", 22, "right", "Churches", 0);
menus[0].addItem("", "", 22, "right", "Schools", 0);
menus[0].addItem("", "", 22, "right", "Local Attractions", 0);
menus[0].addItem("", "", 22, "right", "Directory", 0);
menus[0].addItem("", "", 22, "right", "Advertisements", 0);
}
//OUTER CLOSING BRACKET. EVERYTHING ADDED MUST BE ABOVE THIS LINE.

*******************************************************

Any idea what's going on ? Believe me, it has taken me hours to get to the point where I can document this.

Many thanks

cr3ative
12-04-2004, 07:27 PM
The most common problem with Uni/Linux servers is their ability to do this:

Have two files in the same folder, one called A.js and the other called a.js - note the difference in case. Windows can't do this; so firstly check that all filenames are uploaded in the correct case and are being referred to in the correct case...

So if you upload as script.JS and refer to it as script.js, it won't work.

Just a thought.

Anyway, you most certainly can't leave out the copyright notice on the final website, as that is a violation of the terms and conditions.

cr3ative

kergilliack
12-04-2004, 08:41 PM
Thanks for the speedy response.

No problem with Copyright - Copyright will be in live site - Just trying to break the problem down to its simplest form, which I always consider to be the right approach.

Nothing to do with case sensitivity, but thanks anyway - None of my file names contain any upper case characters. THat was my own first thought, with it all working OK under Windows hosting.

As you can see, the only difference between the 2 Java scripts is that one has a text string 1 character longer than the other. Have since tried changing "Advertisements" to "dvertisements", i.e. leave 1 character off the front. Result - This also works OK.

It really is a strange one. Not really a problem, the live site can say "Advertising", and this also works OK. Biggest issue would be (if this is what's causing it) not being abe to predict when/if it would go wrong, but can check things out by loading to a sub-directly initially.

Any other ideas on what's happening much appreciated.