Flyout menu not hiding on mouse out

Discussion in 'JavaScript' started by ballyhero, Mar 14, 2011.

  1. #1
    Hi forum
    I am working on not for profit website and have zero javascript skills.
    The submenu is persisting on mouse out. Please visit www.sydneybuddhistcentre.org.au to see it in action.
    I have read through the two menu js files but can't reverse engineer. Can anyone help? I have attached a zip of the two files (email me if you want the files email to you in plain text)
    Thanks heaps
    Beth
     

    Attached Files:

    ballyhero, Mar 14, 2011 IP
  2. ballyhero

    ballyhero Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Update: I have checked a back up file and the menu used to work prior to changing linked filed extensions from html to php files. At the same time the two menu scripts were moved to an include file.
     
    ballyhero, Mar 15, 2011 IP
  3. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You're using Dreamweaver to make a Buddhist site? That's pretty funny :D

    Menu works when I remove the comments around this section:
    
    [COLOR="red"]<!--[/COLOR] <tr>
    <td id="mBodyWork" onMouseOver="KillMenus(this.id); this.style.backgroundColor='#172A7A'; MM_showMenu(window.mm_menu_bodywork,110,0,null,'mBodyWork')" onMouseOut="MM_startTimeout();"><a href="bodywork_overview.php" class="button"><font class="textnav">Body Work</font></a></td>
    </tr> [COLOR="red"]-->[/COLOR]
    
    Code (markup):
    Hope that fixes it :)
     
    Cash Nebula, Mar 15, 2011 IP
  4. ballyhero

    ballyhero Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks Cash Nebula. I have applied that change but am not seeing a correction in behavior. My test page is located at the site address then /test/test/index.php
     
    ballyhero, Mar 15, 2011 IP
  5. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Only the comments should be removed. The mBodyWork section has to be in there for the menu to work.
    I'm seeing lots of error messages because the script can't find that section.
    
    <tr>
    <td id="mRegularEvents" onMouseOver="KillMenus(this.id); this.style.backgroundColor='#172A7A'; MM_showMenu(window.mm_menu_regularevents,110,0,null,'mRegularEvents')" onMouseOut="MM_startTimeout();"><a href="special_buddhism_events.php" class="button"><font class="textnav">Regular Events</font></a></td>
    </tr>	
    [COLOR="blue"]<tr>
    <td id="mBodyWork" onMouseOver="KillMenus(this.id); this.style.backgroundColor='#172A7A'; MM_showMenu(window.mm_menu_bodywork,110,0,null,'mBodyWork')" onMouseOut="MM_startTimeout();"><a href="bodywork_overview.php" class="button"><font class="textnav">Body Work</font></a></td>
    </tr>[/COLOR]
    <tr>
    <td id="mRetreats" onMouseOver="KillMenus(this.id); this.style.backgroundColor='#172A7A'; MM_showMenu(window.mm_menu_retreats,110,0,null,'mRetreats')" onMouseOut="MM_startTimeout();"><a href="meditation_buddhism_retreats_overview.php" class="button"><font class="textnav">Retreats</font></a></td>
    </tr>
    
    Code (markup):
    To get rid of the "Body Work" menu, all references to it should be removed from the script.
    
    	document.getElementById('mBodyWork').style.backgroundColor = '';
    	var menuNames = new Array('mBodyWork');
    
    Code (markup):
     
    Last edited: Mar 16, 2011
    Cash Nebula, Mar 15, 2011 IP
  6. ballyhero

    ballyhero Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Woohoo! Thanks for that! Working well now. Am very happy.
    PS. How did you know I was using Dreamweaver?
     
    ballyhero, Mar 16, 2011 IP
  7. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #7
    You're welcome :cool:

    It's easy to spot because Dreamweaver uses huge amounts of javascript for dynamic menus.
    Also, most of the function names have the prefix "MM" because Dreamweaver was originally a Macromedia product.
     
    Cash Nebula, Mar 16, 2011 IP