Results 1 to 2 of 2

Thread: sdmenu auto expand from navigation

  1. #1
    Join Date
    Nov 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default sdmenu auto expand from navigation

    1) Script Title: sdmenu.js

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/slashdot.htm

    3) Describe problem:
    I have the menu working perfectly. What I would like to do is have a menu item expand automatically when the main sub navigation is clicked.

    I have a page called services.htm which has the sdmenu on it collapsed with four categories:
    1. Landscape Consultancy
    2. Landscape Design
    3. Landscape Construction
    4. Landscape Maintenance

    When you click on any of the 4, the category's text appears. When you click on another it expands and the first one collapses. All working beautifully.

    I also have a main menu which has the Services link with the four categories as dropdowns on rollover (not using sdmenu for that). What I would like it to do is when you click on Landscape Consultancy in the main menu drop down for the services page to load and the 1. Landscape Consultancy to expand. And the same if you click on any of the other 3 in the main nav dropdown.

    I have tried various things like:
    Code:
     <a href="JavaScript:('/services.htm', var targetMenu = document.getElementById('consult'); myMenu.expandMenu(targetMenu);)">LANDSCAPE CONSULTANCY</a>
    and
    Code:
     <a href="/services.htm" onclick="var targetMenu = document.getElementById('consult'); myMenu.expandMenu(targetMenu);">LANDSCAPE CONSULTANCY</a>
    (not sure if I did that [CODE] thing properly I'm a newbie - ha, looks like I did!)

    I hope someone can help. While my CSS and HTML is passable my Javascript is non existent so please be very specific about where I should put the code and any tags that need to go around it.

    Thanking you in advance, I'm at my wits end.
    Last edited by yeahdesign; 11-27-2009 at 06:34 AM.

  2. #2
    Join Date
    Nov 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Seems nobody likes a challenge

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
  •