Results 1 to 8 of 8

Thread: Failure to Comprehend

  1. #1
    Join Date
    Feb 2008
    Posts
    11
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Failure to Comprehend

    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:

    spaef.com

    my test is at:

    spaef.com/site

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,920
    Thanks
    43
    Thanked 3,187 Times in 3,151 Posts
    Blog Entries
    12

    Default

    These files are not where (as indicated by the addresses shown) the browser (FF, in this case) is looking for them:

    Code:
    http://spaef.com/SPAEF/menu.js
    http://spaef.com/SPAEF/menucontext.js
    And, the script tags:

    Code:
    <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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    d_weaver (05-10-2008)

  4. #3
    Join Date
    Feb 2008
    Posts
    11
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    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?

    Derek

  5. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,920
    Thanks
    43
    Thanked 3,187 Times in 3,151 Posts
    Blog Entries
    12

    Default

    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #5
    Join Date
    Feb 2008
    Posts
    11
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default It worked, thanks, NOW…

    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?

  7. #6
    Join Date
    Feb 2008
    Posts
    11
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default And…

    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?

  8. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,920
    Thanks
    43
    Thanked 3,187 Times in 3,151 Posts
    Blog Entries
    12

    Default

    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:

    Code:
    <script type="text/javascript" . . .
    for a style tag:

    Code:
    <style type="text/css" . . .
    It is also required for link tag that imports style:

    Code:
    <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):

    Code:
    <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
    </script>
    It appears that in menu.js there is also a setting for the text color:

    Code:
    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:

    Code:
    <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;}
    </style>
    Last edited by jscheuer1; 05-11-2008 at 03:50 PM. Reason: add info
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  9. #8
    Join Date
    Feb 2008
    Posts
    11
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default I found the color, what about moving the menu

    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.
    Last edited by d_weaver; 05-11-2008 at 04:11 PM. Reason: Lost half of the text

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •