Results 1 to 7 of 7

Thread: Top Navigation Bar III

  1. #1
    Join Date
    Dec 2004
    Location
    Omaha, Nebraska
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Top Navigation Bar III

    http://www.dynamicdrive.com/dynamici...men3/index.htm

    I just modified the custom.js script file to use with my web site and checked my modifications using the template.html file provided by the developer. Everything works great as long as the template.html file is in the same folder as all of the scripts. When I move the template.html file outside of the folder containing the scripts, and update the paths in the HTML file to link with the script files, the menu does not appear on the page. Do the HTML file and script files have to be in the same folder to work? Can the scripts be modified so that the HTML file can be in a different location than the script files? I am hoping to organize my site by linking all of the pages to one location for the script files rather than duplicating all of the script files through out my site.

    Thanks for the help,

    Paul

  2. #2
    Join Date
    Dec 2004
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Also, what does it mean when I try to open custom.js and it says 'exclude' is undefined?

  3. #3
    Join Date
    Dec 2004
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Oops, sorry Paul...I meant to post this in my thread, not yours.

  4. #4
    Join Date
    Aug 2004
    Location
    Brighton
    Posts
    1,563
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    @rose_lady: Do not try to open .js files - they don't work like that. Read the implementation instructions on how to get them working.

    @Paul: How are you making the script see where the new file locations are? Are you using absolute (www.webhost.com/script/script.js) or relative (/script/script.js)?

    cr3ative
    A retired member, drop me a line through my site if you'd like to find me!
    cr3ative media | read the stickies

  5. #5
    Join Date
    Dec 2004
    Location
    Omaha, Nebraska
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    rose_lady : No problem. It sound like you may be double clicking on the custom.js file to open it. That is probably why you are getting that error message. What you need to do is use a text editing program (not Word) to open the file. Once you open the file, save it as a new file, changing the name slightly (custom1.js), so you have a back-up of the original file. You will need to change the name of the link in your HTML file to match the name of your new script file.

    cr3ative: I am using relative linking. To run the test, I have the script files in a folder called "navigation" and placed the folder in my root directory. The HTML file "template.html" is also in the root directory. I used relative linking to link the HTML file to the script files (i.e. <script type="text/javascript" language="javascript" src="navigation/sniffer.js">). Should I be using absolute linking?

    Here are links to my files if you would like to examine what I did:
    Located in the "navigation" folder: http://trivilinodesign.com/topmenu3/.../template.html
    Located outside of the "navigation" folder:
    http://trivilinodesign.com/topmenu3/template.html

    Paul

  6. #6
    Join Date
    Aug 2004
    Location
    Brighton
    Posts
    1,563
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Yes, I would suggest trying to use absolute targeting. The code is implemented correctly, so I can only think that that is the problem.

    Regards
    cr3ative
    A retired member, drop me a line through my site if you'd like to find me!
    cr3ative media | read the stickies

  7. #7
    Join Date
    Dec 2004
    Location
    Omaha, Nebraska
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the suggestion, cr3ative. Unfortunately, it did not work. The file that is currently posted at http://www.trivilinodesign.com/topmenu3/template.html is the revised HTLM file using absolute links. Looks like I will have copies of the script files scattered through out my Web site. Such a waste of disk space.

    Thanks for the help.

    Paul

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
  •