Changing fontcolor in formfield

Giganews Newsgroups
Subject: Changing fontcolor in formfield
Posted by:  Joe (amplifymyso…@hotmail.com)
Date: Wed, 2 Jul 2003

having this script:
-------------------------------------------------------------------
<script language="JavaScript" type="text/javascript">
<!--
function isanumber()
{
var antal = document.insert.antal.value;
var isanumber = /^[0-9]+$/;
if(isanumber.test(antal))
{
  ready = true;
}
else
{
  document.forms.insert.antal.focus();
document.forms.insert.antal.value = "insert a number";
ready = false;
}
return ready;
}
-->
</script>
-------------------------------------------------------------------

I would like to change the fontcolor in the inputfield to red when the
function returns FALSE.Can this be done, and if, how??

Joe

Replies