I'm looking to make a new function that will validate the field but allow for negative numbers aswell as positive e.g. =/- 999.99 . Would anyone have a quick and easy solution. Thanks
function validateNumber(thenumber){
try{
validnumbers = "0123456789.,";
valid = false;
for(i=0;i<thenumber.length;i++){
if (validnumbers.indexOf(thenumber.charAt(i)) == -1)
{
valid = false;
break;
}
else
valid = true;
}
return valid;
}catch(e){}
}