View Full Version : Mouseout Argument Not Workin

09-01-2006, 08:38 PM
1) Script Title: AnyLink CSS Menu script

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/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>


Here's the page where you can see it not working:

09-01-2006, 08:45 PM
The problem most likely is due to the Drop Down menu script's own "omouseoout" event canceling out your own. Inside the code:

function delayhidemenu(){

of anylinkcss.js, change that to:

function delayhidemenu(){

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.

09-01-2006, 09:01 PM
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: