luds
05-07-2003, 06:52 PM
Hi
I'm trying to get a simple rollover button to work... but I think I'm missing something!
the code is...
<script language="JavaScript1.1" type="text/JavaScript">
<!-- Hide from older browsers
if(document.images)
{
upHistory = new Image
downHistory = new Image
upHistory.scr = "navbars/buttons/historyup.gif"
downHistory.src = "navbars/buttons/historydown.gif"
}
else
{
upHistory = ""
downHistory = ""
document.historybut = ""
}
// End hiding script -->
</script>
<body>
<a href="backgroundhtml.htm"
onMouseOver="document.historybut.src=downHistory.src"
onMouseOut="document.historybut.src=upHistory.src">
<img src="navbars/buttons/historyup.gif" width="158" height="47" name="historybut" alt="See how the National Mozart Competition started"></a>
The message in both IE and Netscape javascript errors is "uphistory is not defined" and "downHistory" is not defined.
Thanks
luds
I'm trying to get a simple rollover button to work... but I think I'm missing something!
the code is...
<script language="JavaScript1.1" type="text/JavaScript">
<!-- Hide from older browsers
if(document.images)
{
upHistory = new Image
downHistory = new Image
upHistory.scr = "navbars/buttons/historyup.gif"
downHistory.src = "navbars/buttons/historydown.gif"
}
else
{
upHistory = ""
downHistory = ""
document.historybut = ""
}
// End hiding script -->
</script>
<body>
<a href="backgroundhtml.htm"
onMouseOver="document.historybut.src=downHistory.src"
onMouseOut="document.historybut.src=upHistory.src">
<img src="navbars/buttons/historyup.gif" width="158" height="47" name="historybut" alt="See how the National Mozart Competition started"></a>
The message in both IE and Netscape javascript errors is "uphistory is not defined" and "downHistory" is not defined.
Thanks
luds