Button Font Attribute
Hey all,
Im having some difficulty here. I have a button which takes you home. However, onmouseover fires a script which uses onTimeout() to change it from one color to another and then back again. Im also trying to make the font weight change in time. Im just fussy I guess but heres my code lol:
<form name ="Form1">
<input type = "button" name ="homebut" onclick ="homefunction()" onmouseover ="flasher()" onmouseout ="normalit()"></form>
<script language ="javascript">
function flasher(){
var mytimer;
mytimer = window.setTimeout("changeup()", 200)
}
function changeup(){
document.Form1.homebut.style.backgroundColor ='blue';
document.Form1.homebut.style.font ='bold';//this is causing major errors.
mytimer = window.setTimeout("changedown()", 200)
}
function changedown(){
document.Form1.homebut.style.backgroundColor ='white';
mytimer = window.setTimeout("changeup()", 200)
}
</script>
<script language ="javascript">
function normalit(){
window.clearTimeout(mytimer);
document.Form1.homebut.style.backgroundColor ='';
}
</script>
Help would be much appreciated.
Thanks
interrupt
__________________
\'sync\' <cr>
The name specified is not recognized as an internal or external command, operable program or batch file.
|