having this script:
-------------------------------------------------------------------
<script language="JavaS cript" type="text/javascript">
<!--
function isanumber()
{
var antal = document.insert .antal.value;
var isanumber = /^[0-9]+$/;
if(isanumber.te st(antal))
{
ready = true;
}
else
{
document.forms. insert.antal.fo cus();
document.forms. insert.antal.va lue = "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="JavaS cript" type="text/javascript">
<!--
function isanumber()
{
var antal = document.insert .antal.value;
var isanumber = /^[0-9]+$/;
if(isanumber.te st(antal))
{
ready = true;
}
else
{
document.forms. insert.antal.fo cus();
document.forms. insert.antal.va lue = "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
Comment