01-02-2012 07:24 AM
01-02-2012 07:37 AM
/^\d+$/.test(myNumber) === true
01-02-2012 07:50 AM
function isNumeric(val) {
var numeric = true;
var chars = "0123456789.-,+";
var len = val.length;
var char = "";
for (i=0; i<len; i++) { char = val.charAt(i); if (chars.indexOf(char)==-1) { numeric = false; } }
return numeric;
}
One more robust solution maybe is YAHOO.lang.isNumber(myNumber), which is available if you are using share. http://developer.yahoo.com/yui/docs/YAHOO.lang.html#method_isNumber
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.