Results 1 to 3 of 3

Thread: Mouseout Argument Not Workin

  1. #1
    Join Date
    Dec 2005
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Mouseout Argument Not Workin

    1) Script Title: AnyLink CSS Menu script

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

    3) Describe problem:

    I've used the script above and modified it to have a mouseover effect to the link/image and it worked great, however my mouseout argument is not working.

    When you mouse out off the button/link/image stays lit up. Can anyone help with this? Here's the script:

    <a href="our_dental_team.htm" onMouseover="image1.src='Lanitech_Artwork/homepage_button_our_dental_team_on.jpg'; dropdownmenu(this, event, 'anylinkmenu1')" onmouseout="image1.src='Lanitech_Artwork/homepage_button_our_dental_team_off.jpg';" target="_self" href="our_dental_team.htm">
    <img name="image1" src="Lanitech_Artwork/homepage_button_our_dental_team_off.jpg" border="0" alt="Our Dental Team" width="107" height="40" longdesc="tooth whitening dentist in roseville rocklin"></a><div id="anylinkmenu1" class="anylinkcss" style="width: 90px; background-color: lightyellow">
    <a href="our_dental_team_dr_vongschanphen.htm">About Dr. Jon</a>
    <a href="our_dental_team_meet_the_team.htm">Meet the Team</a>
    <a href="our_dental_team_tour_our_office.htm">Tour Our Office</a>
    </div>

    ------------------------------------------------------------------------
    -------------------------------------------------------------------------

    Here's the page where you can see it not working:
    http://www.lonetreedental.com/index.htm

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    The problem most likely is due to the Drop Down menu script's own "omouseoout" event canceling out your own. Inside the code:

    Code:
    function delayhidemenu(){
    delayhide=setTimeout("dropmenuobj.style.visibility='hidden'",disappeardelay)
    }
    of anylinkcss.js, change that to:

    Code:
    function delayhidemenu(){
    image1.src='Lanitech_Artwork/homepage_button_our_dental_team_off.jpg'
    delayhide=setTimeout("dropmenuobj.style.visibility='hidden'",disappeardelay)
    }
    Now, this change is very rudamentary, and assumes you only have one Drop down menu link on your page. If you need something more generic, let me know.

  3. #3
    Join Date
    Dec 2005
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Cool that fixed 1/2 the Problem . . .

    Thank you that worked for the images that had the drop down effect, but what about my other 2 images? Buttons labeled "affordable dentistry" and "Neuromuscualar Dentistry"? They are simple mouseover buttons with no drop down .css reference, they should work?. Here's my regular button's script:

    <a onmouseover="image9.src='Lanitech_Artwork/homepage_button_affordable_dentistry_on.jpg';" onmouseout="image9.src='Lanitech_Artwork/homepage_button_affordable_dentistry_on.jpg';" target="_self" href="affordable_dentistry.htm">
    <img name="image9" src="Lanitech_Artwork/homepage_button_affordable_dentistry_off.jpg" border="0" alt="Affordable Dentistry" width="68" height="40" longdesc="tooth whitening dentist in roseville rocklin"></a>
    -----------------------------------------------------------
    See it here 1/2 working:
    http://www.lonetreedental.com/

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
  •