Results 1 to 4 of 4

Thread: how to inhibit hvmenu navigation when submenus are present?

  1. #1
    Join Date
    Feb 2006
    Posts
    236
    Thanks
    8
    Thanked 3 Times in 3 Posts

    Default how to inhibit hvmenu navigation when submenus are present?

    1) Script Title: HV Menu v5.5

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...menu/index.htm

    3) Describe problem: When a base menu item has submenus, I need to disable the link at the base. For example, in the demo menu on the code page (above link) NEWS has two submenus (and little right arrows), so you do not want a link at NEWS, since no one expects to have a content link there. So, I need to modify the code to not link to anything if the menu item has submenus. I believe this is something that almost everyone would want. Does anyone see an easy way to do this? Can't have a 'page not found'.....and I do because I'm using it right now. Thanks in advance.

  2. #2
    Join Date
    Jan 2007
    Posts
    629
    Thanks
    10
    Thanked 28 Times in 28 Posts

    Default

    So you are saying that on the root menu you do not want it linked to a file?
    A simple way is to make the URL either "#" or "?", or you could make the URL "javascript: var x=null;" etc. With all of these, nothing will happen when you click the link. Otherwise, you will have to re-write part of the script and remove the anchor tags from those root menu items.
    --Jas
    function GreatMinds(){ return "Think Like Jas"; }
    I'm gone for a while, but in the meantime: Try using my FTP script | Fight Bot Form Submissions

  3. #3
    Join Date
    Feb 2006
    Posts
    236
    Thanks
    8
    Thanked 3 Times in 3 Posts

    Default

    Used the '#' and it worked perfectly. Thanks a lot. Suppose that this trick should be posted to the script link so others can find it.

    Personally, I like the menu the was it is, but I'm doing a site for someone that finds the root menu is never (or infrequently) accessed, so I assume that it is uncommon for other menus to link the way hvmenu does.

  4. #4
    Join Date
    Jan 2007
    Posts
    629
    Thanks
    10
    Thanked 28 Times in 28 Posts

    Default

    Any time. I think they take it for granted that not all people know about the "#" trick.

    Most menus DO allow the root menu to have a link, though I agree that most people never use it.
    --Jas
    function GreatMinds(){ return "Think Like Jas"; }
    I'm gone for a while, but in the meantime: Try using my FTP script | Fight Bot Form Submissions

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
  •