Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

Rollover Buttons


ghost's Avatar
0 0

Why won't this code work? The onmouseover function works fine but when i take the mouse off it, the pic stays orange! WTF is wrong?

<head>
<script type="text/javascript">
function products1()
{
document.products.src="http://jetboard.ifastnet.com/rollover/Products1.jpg"
}
function products()
{
document.products.src="http://jetboard.ifastnet.com/rollover/Products.jpg"
}
</script>
</head>

<body>
<a href="http://jetboard.ifastnet.com/">
<img border="0" src="http://jetboard.ifastnet.com/rollover/Products.jpg"
name="products" onmouseOver="products1()" onmouseOut="products()"></a>
</body>
</html>```

ghost's Avatar
0 0

try this

<script type="text/javascript">
function mouseOver()
{
document.button.src ="buttonB.gif"
}
function mouseOut()
{
document.button.src ="buttonA.gif"
}
</script>
<a href='page.html'><img border="0" alt="Return" src="buttonA.gif" name="button" onmouseOver="mouseOver()" onmouseOut="mouseOut()"></a>

this code is taken directly from a working mouseover on my site, just change your links and sources. Hope this helps


ghost's Avatar
0 0

pm me with your chat preference ….

-pokjomama

ill help you out


ghost's Avatar
0 0

@atr, i changed links and sources, and the color still stays orange. The onmouseout function still doesn't work!


ghost's Avatar
0 0

http://greencows.web-space.ws/button.html

that works on my comp, so just copy the source. Hope it helps.

PS: if it still stays orange, something might be wrong with your browser, try viewing it in a different one (ie7,opera,ff, you know)


ghost's Avatar
0 0

i use ff2 and ff but it doesnt work in either? and i hate ie7


AldarHawk's Avatar
The Manager
0 0

Here is the code I use for mouseover events.

<a class="button1" href="1.php" onmouseover="button1.src='1down.gif'" onmouseout="button1.src='1up.gif'">
<img src="1up.gif" alt="BUTTON1" border="0" name="button1"></img></a>
<a class="button2" href="2.php" onmouseover="button2.src='2down.gif'" onmouseout="button2.src='2up.gif'">
<img src="2up.gif" alt="BUTTON2" border="0" name="button2"></img></a>

ghost's Avatar
0 0

end3r wrote: i use ff2 and ff but it doesnt work in either? and i hate ie7

Why do you hate IE? If you wanna hate something hate Mac's…i hate Macs…

Set up a dummy website and have the same code on it, see if that works, if it does then its your website..