Trying to get 6 rollover buttons (three-state: link, hover, click) on same page (not published yet – no url). I’m not a programmer, so I found some code off of a tutorial page that works great. Problem is, I can only get it to work on the first button (all buttons are exactly the same, and use the same three source-images). What I tried was to simply copy and paste the <a href> material from the first button, and apply to the second button’s location. The effect of this was that neither the first nor the second would work. FYI – I’m testing the code on IE 6 and Opera 7.5. How do I alter the code and html to get all 6 buttons to look and function exactly the same? Here’s the code that works for the first button:
<SCRIPT Language=”JavaScript”>
<!–
// Load images for menu
var button1
var button2
var button3
if(document.images){
button1 = new Image(45,45)
button2 = new Image(45,45)
button3 = new Image(45,45)
button1.src = “images/button1.jpg”
button2.src = “images/button2.jpg”
button3.src = “images/button3.jpg”
}
//–>
</SCRIPT>
<A HREF=”about.html”
onMouseOver=”document.button.src=button2.src”
onMouseDown=”document.button.src=button3.src”
onMouseOut=”document.button.src=button1.src”>
<IMG src=”images/button1.jpg” align=”absmiddle” border=”0″ name=”button” /></A>
Thanks for your time! ~simplifye