Results 1 to 2 of 2

Thread: javascript problem

  1. #1
    Join Date
    Nov 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default javascript problem

    hi,
    i got a script from dynamicdrive, its name is smart fold tree menu

    i used in following page

    http://www.mizuwork.com/mishow/sort.php

    please view source to see the codes

    however when i try to click on the main menu to get sub menu, the submenu disappear once when the mouse is over it. please help, how to solve

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    You cannot make a foldheader be a link, like you have here:

    Code:
    <a href="sort.php?cat=1"><li id="foldheader">he he</li></a>
    here:

    Code:
    <a href="sort.php?cat=3"><li id="foldheader">ho ho</li></a>
    and here:

    Code:
    <a href="sort.php?cat=4"><li id="foldheader">co co</li></a>
    If you do, what happens is that when you click it and the menu starts to open, it loads a new page or, in this case, a new version of the same page with a query string appended to the page name. As the new version of the page loads, all menu trees revert to their onload state, which is closed.

    If you add the persistence feature (step4 from the demo) you should be able to do it the way you have it but, to what end?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •