dannykilla
09-02-2008, 08:25 PM
Hi,
I am trying to do a ImageRollover with this Javascript which you can see here:
http://www.thesitewizard.com/archive/rollovers.shtml
and here is my code (don't laugh, n00b here) and this is not working so can anyone point me in the right direction?
<a href="http://www.xxxxxxxxxx.co.uk"
onMouseover="buttondown('homebuttondown')"
onMouseout="buttonup('homebutton')">
<img src="http://www.xxxxxxxx.co.uk/images/homebutton.png" name="Home" border="0" />
</a>
<script language="JavaScript" type="text/javascript">
<!--
if (document.images) {
homebuttonup ="buttonup"('homebutton.png');
homebuttonup.src = "http://www.xxxxxxxxx.co.uk/images/homebutton.png" ;
homebuttondown ="buttondown"('homebuttondown.png') ;
homebuttondown.src = "http://www.xxxxxxxxxxx.co.uk/images/homebuttondown.png" ;
}
function buttondown(homebuttondown.png)
{
if (document.images) {
document[ buttonname ].src = eval( buttonname + "down.src" );
}
}
function buttonup (homebutton.png)
{
if (document.images) {
document[ buttonname ].src = eval( buttonname + "up.src" );
}
}
// -->
</script>Thanks
Danny
I am trying to do a ImageRollover with this Javascript which you can see here:
http://www.thesitewizard.com/archive/rollovers.shtml
and here is my code (don't laugh, n00b here) and this is not working so can anyone point me in the right direction?
<a href="http://www.xxxxxxxxxx.co.uk"
onMouseover="buttondown('homebuttondown')"
onMouseout="buttonup('homebutton')">
<img src="http://www.xxxxxxxx.co.uk/images/homebutton.png" name="Home" border="0" />
</a>
<script language="JavaScript" type="text/javascript">
<!--
if (document.images) {
homebuttonup ="buttonup"('homebutton.png');
homebuttonup.src = "http://www.xxxxxxxxx.co.uk/images/homebutton.png" ;
homebuttondown ="buttondown"('homebuttondown.png') ;
homebuttondown.src = "http://www.xxxxxxxxxxx.co.uk/images/homebuttondown.png" ;
}
function buttondown(homebuttondown.png)
{
if (document.images) {
document[ buttonname ].src = eval( buttonname + "down.src" );
}
}
function buttonup (homebutton.png)
{
if (document.images) {
document[ buttonname ].src = eval( buttonname + "up.src" );
}
}
// -->
</script>Thanks
Danny