Thursday, July 15, 2004
jscript
jscript
"The function isNumber looks like this:
function isNumber(theElement, theElementName)
{
s = theElement.value;
if ( (s == '') || (isNaN(Math.abs(s)) && (s.charAt(0) != '#')))
{
if ( isNumber.arguments.length == 1 )
alert( ' Value must be a number.' );
else
alert( theElementName + ' Value must be a number.' );
theElement.focus();
return false;
}
return true;
}"
"The function isNumber looks like this:
function isNumber(theElement, theElementName)
{
s = theElement.value;
if ( (s == '') || (isNaN(Math.abs(s)) && (s.charAt(0) != '#')))
{
if ( isNumber.arguments.length == 1 )
alert( ' Value must be a number.' );
else
alert( theElementName + ' Value must be a number.' );
theElement.focus();
return false;
}
return true;
}"