I am checking if a input field is empty but would like to check if it is numeric since it is a street address. I only want numeric to be allowed, no alpha even though an address might be like 123a or something else.
I want to keep the same format cause I'm checking other fields in the same function and want it to be the same. Below is what I have for empty field. What is the easiest way to change it to check for numeric only. I was trying if( !isNumeric (numbr.value)) but it isn't working.
var numbr = document.getElementById( "numbr" );
if( numbr.value == "") {
error = "Address number must be entered. Numeric only.";
document.getElementById( "error_para" ).innerHTML = error;
return false;
}