View Full Version : Failure to Comprehend

05-10-2008, 01:19 PM
1) Script Title: Navagation top bar

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/sm/index.htm

3) Describe problem: I am redesigning a web site that is using this script. When I test the page on my local computer the navigation bar appears and works. When I load it onto the remote I get nothing. I have loaded all the .js and .css files into a test folder on the site. I can't figure out what I am doing wrong. Original is at:


my test is at:


05-10-2008, 04:14 PM
These files are not where (as indicated by the addresses shown) the browser (FF, in this case) is looking for them:


And, the script tags:

<script language="JavaScript" src="../../SPAEF/menu.js"></script>
<script language="JavaScript" src="../../SPAEF/menucontext.js"></script>

appear to point to a directory on the server not in the site's normally navigable area (the paths point to a place above the root of the domain - closer to the root of the server's HD, though the browser looked for them off the root of the domain, so you are really confusing the browser). Try moving them to the folder the page is in, or at least into a folder in the navigable area somewhere, and pointing to them there instead.

BTW, (most likely not causing any problem right now) the language attribute has been deprecated and the type attribute (required) is missing.

There could also be other problems.

05-10-2008, 06:09 PM
Thank you for the reply.

If I understand correctly, what you are telling me is that the code for the test should have the script look in the /site folder for the .js files. And again with the script language should also have the …/site as in:

<script language="JavaScript" src="../../SPAEF/site/menu.js"></script>
<script language="JavaScript" src="../../SPAEF/site/menucontext.js"></script>

And once the test is competed, I will need to make the change back for the real site.

Am I understanding your answer?


05-10-2008, 06:45 PM
Maybe. The important thing is, if your page needs an external file or files, they must be where the page is looking for them, and be available to the browser that is looking at the page. Just like an image file used on a page.

05-11-2008, 02:23 PM
What I needed to do was direct dreamweaver to the file, duh?

I've gone through the code looking for color and tried to make all the changes that would make the drop down menu blend. Am I just dense, or is there color in the code that I missed for the background of this menu?

05-11-2008, 02:24 PM
what do you mean by "the language attribute has been deprecated and the type attribute (required) is missing." This is in the .ccs files, or in the .js files?

05-11-2008, 03:37 PM
I'm not sure what you mean by blend.

About the attributes. The type attribute is required for both script and style tags. For a script tag:

<script type="text/javascript" . . .

for a style tag:

<style type="text/css" . . .

It is also required for link tag that imports style:

<link rel="stylesheet" type="text/css" . . .

The language attribute was never used for the style tag, and is deprecated in the script tag. Deprecated means you can still use it, but that the results are unpredictable, and likely to become more so, as time moves forward.

This part of the on page code (with corrections) is the only place for color I found (it is the menu's background color):

<script type="text/javascript">
//Top Nav Bar I v2.1- By Constantin Kuznetsov Jr. (script@esolutiononline.com)
//Modified by Dynamic Drive for NS6/Opera6 compatibility and code streamlining March 4th, 2002
//Visit http://www.dynamicdrive.com for this script

var keepstatic=1 //specify whether menu should stay static 0=non static (works only in IE4+)
var menucolor="#000000" //specify menu color
var submenuwidth=150 //specify sub menus' width

It appears that in menu.js there is also a setting for the text color:

this.fontColor = "black";

But in there it says:

default font settings. Don't change. Instead, modify stylesheet in sample.htm

That would be (also corrected) this:

<style type="text/css">
all.clsMenuItemNS, .clsMenuItemIE{text-decoration: none; font: bold 12px Arial; color: white; cursor: hand; z-index:100}
#MainTable A:hover {color: yellow;}

05-11-2008, 04:06 PM
The color code is on the index page. The menu.js, I believe, refers back to the index for direction in color, i.e.:

this.bgColor = menucolor;

So when I changed the color in the index page it changed the pull down.

Now what I am wondering is if I can nudge the pull down over to the right. I find this in the .js:

rightY = 0;
leftY = 0;
leftX = 0;

So if I change the "rightY=" to "10" would that move the whole menu over 10 pixels? What I want to do is keep the pull down from covering the business logo. What I am thinking is that the code would read:

rightY = 10
leftY = 0
leftX = 0

and that this would nudge everything over to the right.