I’m just getting started with javascript. I followed a tutorial.. I want a form submit button to have a rollover effect. Here is the html:
[code]
<div id=”content”>
<script type=”text/javascript”>
//<![CDATA[
Rollimage = new Array();
Rollimage[0] = new Image(74,27);
Rollimage[0].src = “/images/Save.gif”;
Rollimage[1] = new Image(74,27);
Rollimage[1].src = “/images/Save-Over.gif”;
function Out() {
document.form.save_button.src = Rollimage[0].src;
return true;
}
function Over() {
document.form.save_button.src = Rollimage[1].src;
return true;
}
//]]>
</script>
<form>…
<input type=”image” name=”save_button” src=”/images/Save.gif” style=”background: transparent;” onMouseOver=”Over()” onMouseOut=”Out()” width=”74″ height=”27″ alt=”Continue” />
</form>
</div>
It’s not working. Can anyone help?