SCRIPT438: Object doesn't support property or method 'match'
I keep getting the error "
SCRIPT438: Object doesn't support property or method 'match' "
Its a simple text box the user enters numbers only into. Here's the code for my function:
- function IsNumeric(item, message, scrollTo, focus) {
- var numExp = /[0-9 -()+]+$/;
- var aReturn;
- aReturn = $('#' + item).match(numExp);
- if (message && !aReturn) alert(message);
- if (scrollTo && !aReturn) ScrollToPosition(0, scrollTo);
- if (focus && !aReturn) { $('#' + item).focus(); ScrollToElement(item); }
- return aReturn;
- }
- aReturn = IsNumeric('RentalPropertyZip', 'Please enter a valid zip code.', null, true);
- if (!aReturn) return aReturn;