The Arcive of vBulletin Modifications Site. |
|
|
#1
|
||||
|
||||
|
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? Code:
<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>
Danny |
|
#2
|
|||
|
|||
|
The function needs to be defined before the actually a tag. Also you don't really need all that code to change image for rollover.
http://www.java-scripts.net/javascri...r-Script.phtml |
|
#3
|
||||
|
||||
|
I sorted it now but thanks for the link m8
Dan |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|