SitePoint Sponsor

User Tag List

Results 1 to 13 of 13
  1. #1
    SitePoint Zealot dkilburn's Avatar
    Join Date
    Jul 2000
    Location
    Inyokern, CA
    Posts
    181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just set up the topnavebar on http://www.collegeteacher.org/web_pa...alendar.shtml. that I found on http://www.dynamicdrive.com/dynamici...topnavbar.htm. The only thing I can't figure out is how to center it over the main table on the page. Better yet, I'd like to position it in the table. Is that possible?

    If anyone has an idea, I'd appreciate it! Other than that, setting it up was super easy (colors, fonts, etc.).

    Debby Kilburn
    "With computers, everything is possible, but nothing is easy"
    AIM: fourhweb

  2. #2
    SitePoint Enthusiast Morpheos's Avatar
    Join Date
    Feb 2000
    Location
    Miches, DR.
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello there,

    I have used this navigation bar on my web sites, also. (see: http://www.carib.com/sitetouch/info.html) The Nav Bar parameters are controlled by the CSS code in the document and the navbar.js file that comes with the bar.
    The CSS code in your document control the width and height of the bar. But not the position. You will probably find those control commands in the navbar.js file. I have not looked into them yet but I am sure, if you are experienced with JavaScript, you can change those commands to your needs.
    Have a look and make it happen!

    Good Luck!
    Morpheos - Media Design/Motion
    Creative Kingdom
    morpheos@creative-k.com

  3. #3
    Serial Publisher silver trophy aspen's Avatar
    Join Date
    Aug 1999
    Location
    East Lansing, MI USA
    Posts
    12,937
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've used this bar on many occasions as well.

    To strictly position it you need to use a placer image. All of this is explained in the navbar's tutorial. If you can't find it on DynamicDrive, look for it at brainjar.com which is the homepage of the script.

    Chris Beasley - I publish content and ecommerce sites.
    Featured Article: Free Comprehensive SEO Guide
    My Guide to Building a Successful Website
    My Blog|My Webmaster Forums

  4. #4
    Irritability Defined
    Join Date
    Jul 2000
    Location
    80,000 feet below the surface
    Posts
    1,442
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Side note for Chris : Brainjar no longers holds its previous DHTML examples - it's gone for pure IE5.5/NS 6 stuff now, and Mike has explicitly stated that he no longer has the examples on the site nor will he answer questions regarding them.

    I recall that with the latest version of the navbar you could center the menus inside the JScript file, so it (theoretically) is a matter of editing the JScript file and finding it somewhere (Mike usually comments each section very well).

    We're on our own...
    My 2 Cents (or is that 2.2 Cents including GST?)

  5. #5
    SitePoint Zealot dkilburn's Avatar
    Join Date
    Jul 2000
    Location
    Inyokern, CA
    Posts
    181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm javascript illiterate...document.write is about as far as I have gotten so far. The navcond.js file that comes with the script is a mess to read because all the spaces are taken out. I have the file at http://www.collegeteacher.org/navcond.js if anyone would like to take a stab at it.

    My pages http://www.collegeteacher.org/web_pa...calendar.shtml and http://www.collegeteacher.org/web_pa...syllabus.shtml
    are examples of what I want to do with the bar. Ideally, I'd like to place it inside the table, right above the first headline.

    I've got 2 weeks before school starts to figure it out. Who needs to sleep anyway???

    Thanks folks for any help!
    Debby Kilburn
    "With computers, everything is possible, but nothing is easy"
    AIM: fourhweb

  6. #6
    Irritability Defined
    Join Date
    Jul 2000
    Location
    80,000 feet below the surface
    Posts
    1,442
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ouch. That's impossible to read.

    Lemme dig through my archives and see if I can find the original zip file for it somewhere.....

    Anyone else got a legible copy hanging around somewhere?!
    My 2 Cents (or is that 2.2 Cents including GST?)

  7. #7
    SitePoint Zealot dkilburn's Avatar
    Join Date
    Jul 2000
    Location
    Inyokern, CA
    Posts
    181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just uploaded navcond.js, navbar.js and dhtmllib.js to collegeteacher.org/dynamicmenu/. The documentation for topnavnar said that navcond.js was a condensed version of those two. Hope this helps.
    Debby Kilburn
    "With computers, everything is possible, but nothing is easy"
    AIM: fourhweb

  8. #8
    Irritability Defined
    Join Date
    Jul 2000
    Location
    80,000 feet below the surface
    Posts
    1,442
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK....... Discard navcond.js and have a look at navbar.js.

    Navigate down a few lines to....

    Code:
    //*****************************************************************************
    // NavBar constructor.
    //*****************************************************************************
    
    function NavBar(width) {
    
      this.x = 0;
      this.y = 0;
    
      this.width  = width;
      this.height = 0;
    
      this.align    = "left";
      this.minWidth = 0;
      this.inverted = false;
    Where you see the 'this.align="left"', change that to center and see how it goes. So in other words use both dhtmllib.js and navbar.js to make it work.
    My 2 Cents (or is that 2.2 Cents including GST?)

  9. #9
    SitePoint Zealot dkilburn's Avatar
    Join Date
    Jul 2000
    Location
    Inyokern, CA
    Posts
    181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by BC
    OK....... Discard navcond.js and have a look at navbar.js.
    I made the change and uploaded the file, but now I get a javascript error. At the very top of the menubar code I have

    <SCRIPT LANGUAGE="JavaScript" SRC="../navbar.js"></SCRIPT>
    <SCRIPT LANGUAGE="JavaScript" SRC="../dhtmllib.js"></SCRIPT>
    <SCRIPT LANGUAGE="JavaScript">

    Is there another way to reference both files or is this correct?

    I think we are on to something though :-)
    Debby Kilburn
    "With computers, everything is possible, but nothing is easy"
    AIM: fourhweb

  10. #10
    Irritability Defined
    Join Date
    Jul 2000
    Location
    80,000 feet below the surface
    Posts
    1,442
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try removing one dot or add another dot and see what happens. What error do you specifically get?

    Another way to reference it is just to do

    <script language="JavaScript" src="/dynamicmenu/dhtmllib.js"></script>
    <script language="JavaScript" src="/dynamicmenu/navbar.js"></script>

    See how that goes.
    My 2 Cents (or is that 2.2 Cents including GST?)

  11. #11
    SitePoint Zealot dkilburn's Avatar
    Join Date
    Jul 2000
    Location
    Inyokern, CA
    Posts
    181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The files are referenced correctly in relation to the page. They are actually in the top level directory. I copied them into the dynamicmenu directory in case anyone wanted to look at them. Here's what I got in Netscape:

    JavaScript Error: http://collegeteacher.org/navbar.js, line 312:

    inheritLayer is not defined.

    Debby Kilburn
    "With computers, everything is possible, but nothing is easy"
    AIM: fourhweb

  12. #12
    Irritability Defined
    Join Date
    Jul 2000
    Location
    80,000 feet below the surface
    Posts
    1,442
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    *groan* That's a new error....
    My 2 Cents (or is that 2.2 Cents including GST?)

  13. #13
    SitePoint Zealot dkilburn's Avatar
    Join Date
    Jul 2000
    Location
    Inyokern, CA
    Posts
    181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I temporarily got around the problem by aligning the table to the left (see http://www.collegeteacher.org/web_pa...gn/week1.shtml ). It's not what I really want, but it will do for now. Looks fine in msie, but in netscape there is a small border around the table, even with the body margin set to 0px.

    You know, I used to just love netscape and hate IE. Now I grudgingly have to use it for a lot of things. NS better get with the program or they are going to lose out altogether! Too many things just don't work in NS. I haven't tried the 6.0 yet. I want to wait till they work out the bugs.

    Anyway, I'm still looking for a way to center the menu bar in the middle of the page. If anyone wants to take a look at the files mentioned above and offer wisdom, I'd be greatful!

    Have a great day :-)

    Debby Kilburn
    "With computers, everything is possible, but nothing is easy"
    AIM: fourhweb


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
  •