I'm trying to validate a form field and am new to javascript. I have been using !isNaN but this only seems to detect if there is absolutely no numbers. For example, in the below example if I have 'Willy, Fred5' entered into the input field it seems to detect the strings and does not return false. What I need to do is detect if there is even one numeric value in the input field. But can't seem to find an answer that works.
function fnCheckName(strName) {
strName.style.background = "#FFFFFF";
var nameChk = strName.value;
if (nameChk.indexOf(', ') < 0 || nameChk == "" || !isNaN(nameChk){
strName.style.background = "#FBEC5D";
return false}
else {return true}