View Full Version : Simple Rollover Button Problem - Newbie

12-22-2004, 02:14 PM

I'm new to Javascript, and I would be so grateful if anyone could help me out here. I'm trying to create a rollover button as part of a navigation bar I am going to create in due course. I just can't get the rollover to work though. The actual button appears, however when you hover the mouse over it, nothing happens. Thank you for taking time to help me, and a merry christmas & a happy new year to everybody!

<?xml version="1.0" encoding = "UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<title> Big Dog Music News - Homepage </title>
<link rel="stylesheet" type="text/css" href="home.css"/>
<script language="Javascript" type="text/javascript">

<!-- Hide script from old browsers

buttonLightPurple = new Image
buttonDarkPurple = new Image

buttonLightPurple.src = "images/homeButton.gif"
buttonDarkPurple.src = "images/homeButtonRollover.gif"

buttonLightPurple = ""
buttonDarkPurple = ""
document.button = ""

// End hiding script from old browsers



<div id="header" align="center">
<table width=75%>
<td class="dollar">
<img src="images/dollar.gif" alt="dollar"/>
<td id="logo">
<img src="images/heading.gif" alt="logo"/>
<td class="dollar">
<img src="images/dollar.gif" alt="dollar"/>

<a href="index.html"
<img src="images/homeButton.gif" border="0" name="button" alt="button"/>



Thanks again!

Joe P aka Wobblehead


Willy Duitt
12-22-2004, 04:00 PM
For one you never closed your opening anchor tag and by not working I assume that you can not even see the image...

<a href="index.html"


Willy Duitt
12-22-2004, 04:57 PM
You can also look here: