Hi experts, I'm having trouble of determining the number on the table input text. The code below is use to determine numerical number on a table. The code below will not work with the number with comma, example the 1,999.00. If I'm going to write this number, (1,999.00) it will determine as IsNaN value. However, the code will determine as number if i write that as 1999.00 or without comma. Any help please!
function CheckReceiveTableUP() { var result = "0"; var tbl = document.getElementById('ReceiveTable'); var Cell1 = tbl.querySelectorAll('tr td:nth-child(5)'); for(var i =0; i < Cell1.length; i++) { result = Cell1[i].lastChild.value; if ( isNaN(result) || (result==0 )) { alert("wrong"); $('table tr:nth-child('+z+') #uct').css('border','solid 2px red'); return false; } else { $('table tr:nth-child('+z+') #uct').css('border','solid 2px green'); } result = 0; } alert("Okey"); }