Click here to Skip to main content
15,354,006 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a asp form to show dynamic rows depends on the user from db. I need to loop through all the input field and return a flag only all the input field value is 0.00 in JavaScript once the submit button clicked in thr asp page.

Any help would be really useful for me.

What I have tried:

I tried to get form elements and loop through it using for loop. Now the question is the loop should return a flag only all the values are 0.00.

My code returns flag even few input field value are not 0.00.
Updated 8-Mar-21 5:25am

Maybe you can use the Array method "every" or "some"

var totalcount=$('.clsValue').length;
var validcount=$('.clsValue[value="0.00"]').length

now just compare it


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900