| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| NamePros Member | Mouseover Buttons 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
__________________ "Never let the future disturb you. You will meet it, if you have to, with the same weapons of reason which today arm you against the present". - Marcus Aurelius |
| |
| | #2 (permalink) |
| NamePros Member | 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>
Code: <a href="home.html" onMouseOver="buttondown( 'home' );" onMouseOut="buttonup ( 'home');">
**Linke Here**</a>
__________________ Paulicon Web design - Your one stop shop |
| |
| | #3 (permalink) |
| NamePros Member | 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
__________________ "Never let the future disturb you. You will meet it, if you have to, with the same weapons of reason which today arm you against the present". - Marcus Aurelius |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |