i currently have the following code:
if (isNaN(theForm.askingprice.value))
missing += "Price must be a number\n"
if (missing != ""
{
alert("You must fill in all the required fields without errors.\n\nYou missed the following sections:\n\n"+missing);
return false;
}
else
return true;
I was wondering if there is some sort of isInt function that i could use to check to see if the user entered a integer. So for example if they put 5 it would be ok but if they put 5.5 it would alert them of the error.
if (isNaN(theForm.askingprice.value))
missing += "Price must be a number\n"
if (missing != ""
{
alert("You must fill in all the required fields without errors.\n\nYou missed the following sections:\n\n"+missing);
return false;
}
else
return true;
I was wondering if there is some sort of isInt function that i could use to check to see if the user entered a integer. So for example if they put 5 it would be ok but if they put 5.5 it would alert them of the error.