I have a small if where I'd just like to check a string to see if it is an integer. I am using JQuery to do this.
JQUERY:
var intRegex = /[0-9 -()+]+$/;
if ($('#txtGRCSelect').val() != '' && intRegex($('#txtGRCSelect').val())) {
alert("No CASE");
$("#ErrorBoxText").html("Error : A Role has not been selected.");
rt = true;
}
It doesn't work, can anybody help me and tell me why?