SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Addict
    Join Date
    Sep 2001
    Posts
    320
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    menu buttons not working

    http://hornblowerholidays.com/sf.htm

    can anyone explain to me why the buttons for san diego and marina del rey don't work? thanks!
    Steve Davis

  2. #2
    SitePoint Guru
    Join Date
    Nov 2005
    Location
    Norway
    Posts
    715
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Tested it with IE 6 and 7, Opera and Firefox without any problems. What browser are you using?

  3. #3
    SitePoint Addict
    Join Date
    Sep 2001
    Posts
    320
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    testing in FF 2.0.0.13 and IE6. neither works. the SF button works, but not SD or MDR/NB.

    just a note, im not talking about the submenu items in the dropdowns. im talking about the actual graphical button that is the TOP of the menus (what u mouseover to show the dropdown menus)
    Steve Davis

  4. #4
    SitePoint Guru
    Join Date
    Nov 2005
    Location
    Norway
    Posts
    715
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This has most likely something to do with your javascript put if you have a space between <li class="isParent"> and <a href="http://hornblowerholidays.com/gla.htm"> it will work
    Code:
    <li class="isParent"> <a href="http://hornblowerholidays.com/gla.htm">Marina Del Rey<br>&amp; Newport Beach</a>
            <ul class="hiddenChild">
    ...

  5. #5
    SitePoint Addict
    Join Date
    Sep 2001
    Posts
    320
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yeah. we just figured that out. bizarre.

    WHY does that matter?
    Steve Davis

  6. #6
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,296
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    Yes its a javascript function and is controlled by this line here:

    Code:
    if(firstUL)
                {
                    lis[i].childNodes[0].onclick=function(){return false;}
    That deactivates the link on the first level of the lists and is doing what the script asks of it. I guess its in place because you don't want the top level to be active when javascript is working.

    Adding a space as mentioned confuses the script where the author hasn't checked to see where the parent is white space or a real element. Adding a space only makes it work in Firefox but it still won't work in IE.

    If you want the links to be clickable then comment out the following line like this.

    Code:
    if(firstUL)
                {
                    //lis[i].childNodes[0].onclick=function(){return false;}

  7. #7
    SitePoint Addict
    Join Date
    Sep 2001
    Posts
    320
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks paul! man, u always help me out, you rock!
    Steve Davis


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
  •