Forum Moderators: open
Example:
<script type="text/javascript">
<!--
var News1 = new Image();
var News2 = new Image();
News1.src = "News1.gif"
News2.src = "News2.gif"
var Port1 = new Image();
var Port2 = new Imag();
Port1.src = "Port1.gif"
Port2.src = "Port2.gif"
//-->
</script>
Application of script...:
<td align=center valign=bottom bgcolor="#000000">
<a href="News.html">
<img src="News1.gif" alt="News and updates" width="46" height="21" id="news" border="0"
onmouseover="news.src = News2.src"
onmouseout="news.src = News1.src" />
</a>
</td>
This is the error from a validator, could this be the cause and if so, how can I fix:
onmouseout="news.src = News1.src" />
Warning: net-enabling start-tag; possibly missing required quotes around an attribute value
On Mozilla, first image works. On IE, nothing works. I don't get it. Please help?
Bare Bones Roll-over script [webmasterworld.com]
If you work with it, you will get a sense of how the javascript works instead of trying to type in the script by copying it.