Hi
I have this in my .css file
[CODE]input[type=”submit”] {
margin: 0;
padding: 0px 2px 0px 2px;
width: auto;
overflow: visible;
}
input[type=”submit”].buttonA {
background-color: #FFFF00;
}
and this on a page:
[CODE]<script type=”text/javascript”>
function setbtn()
{
alert(‘hello’);
document.getElementById(‘LoginBtn’).className = ‘buttonA’;
}
</script>
<input type=”text” onkeypress=”setbtn();”>
<input type=”submit” id=”LoginBtn” value=”Log in”>
It works in IE but not in Firefox. Can anyone tell me why please? The function definitely fires on the onkeypress event as the alert is being show, but the button does not change color.