Avatar of Whing Dela Cruz
Whing Dela Cruz
Flag for Anguilla asked on

isNaN issue on the Table input text

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");
        }

Open in new window

ASPHTMLJavaScript

Avatar of undefined
Last Comment
Whing Dela Cruz

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Big Monty

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Whing Dela Cruz

ASKER
Hi Monty, its working thank you so much!
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy