// -->
</SCRIPT>
Such a function can be used as follows to check a field and return an error message if the contents are not numeric:
if (document.frmUser.afield.value.length == 0)
{
alert("Please enter a value.");
}
else if (chkNumeric(document.frmUser.afield.value) == false)
{
alert("Please check - non numeric value!");
}

// -->
</SCRIPT>
Such a function can be used as follows to check a field and return an error message if the contents are not numeric:
if (document.frmUser.afield.value.length == 0)
{
alert("Please enter a value.");
}
else if (chkNumeric(document.frmUser.afield.value) == false)
{
alert("Please check - non numeric value!");
}

Comment from Slimshaneey
Date: 04/02/2004 03:29PM IST
Your Comment

Just stick a test for IsNumeric(input) somewhere then in your code and responsd accordingly...

The code should be like this::
input=x.unitprice.value
if (input.length<1)
{
alert("Please enter item price.")
return false
}
if (IsNumeric(input) == false) //chkNumeric incorrect as the func name is IsNumeric
{

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Thats what Ive posted, a function called IsNumeric... will accept any number and return false if there is any character that is not a point or a number. If you use the code in my last poast it should work fine...

I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference:
Let's make the introductions...
Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…

This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…

In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…