Results 1 to 3 of 3

Thread: Tab Menu with a click instead of mouseover

  1. #1
    Join Date
    Jun 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up Tab Menu with a click instead of mouseover

    1) Script Title: Is it possible to use onmouseclick instead of onmouseover?

    2) Script URL (on DD):
    Tab Menu (onMouseover)
    http://www.dynamicdrive.com/dynamici...bmouseover.htm

    3) Describe problem:
    I like this script. But I want to change the mouseover action to onClick, which means to access the second level menu, I want user to click it instead
    of placing the mouse on it. I tried to replace the 'OnMouseOver' keyword to 'Onclick', but when I clicked one of the item, it immediately submit my form to an address with the '#', which the browser gave error.
    Can anyone tell me how I can change it? Thanks a lot.

  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

    If you do not want the browser trying to load the href, you need to use return false with an onclick event on a link, ex:

    Code:
    <a href="http://www.javascriptkit.com" onclick="showit(0);return false;">JavaScript Kit</a>
    - John
    ________________________

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

  3. #3
    Join Date
    Jun 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks jscheuer1, I applied your suggestions and it worked excellent.


    Johnny

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
  •