NameSilo

Mouseover Buttons

SpaceshipSpaceship
Watch

Smilin' Jack

Established Member
Impact
0
I am having a problem making multiple rollover buttons work.
As displayed on: www.equipmentpolice.com/home.htm,

I am able to get the first two buttons to work.
Can't figure how to do the next four below.

Thanks,
Jack
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable Domains โ€” AI StorefrontUnstoppable Domains โ€” AI Storefront
OK only had a breif look at your code but heres my cod efor mouse over buttons maybe you could use it,

Code:
<script language="JavaScript" type="text/javascript">
<!--


if (document.images){

   //proload your images
    homeOne       = new Image();
    homeOne.src   = "images/homeOne.gif" ;

    homeTwo     = new Image() ;
    homeTwo.src = "images/homeTwo.gif" ;
								
}

function buttondown( buttonname )
{
    if (document.images) {
      document[ buttonname ].src = eval( buttonname + "Two.src" );
	  document.icon.src = "images/"+buttonname+"Icon.gif";
    }
}

function buttonup ( buttonname )
{
    if (document.images) {
      document[ buttonname ].src = eval( buttonname + "One.src" );
	  document.icon.src = "images/mainIcon.gif";
    }
}
// -->
</script>

Then to get it to work do the following

Code:
<a href="home.html" onMouseOver="buttondown( 'home' );" onMouseOut="buttonup ( 'home');"> 
            **Linke Here**</a>
 
0
•••
Mouseover Buttons Reply

Thanks Web,
So what do I use to activate 4 buttons?
Do they all have to have different names even if it is the same images being used for all four?
Say, are you anywhere near Ennis?

Jack
 
0
•••
Code:
<a href=content.php?p=contact><img src=/images/contact_off.gif border=0 OnMouseOver=this.src="/images/contact_on.gif" OnMouseOut=this.src="/images/contact_off.gif"></a>
 
0
•••
Appraise.net
Spaceship
Domain Recover
DomainEasy โ€” Payment Flexibility
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back