J
Joe
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
-------------------------------------------------------------------
<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