CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.

YesSoftware Forums -> CodeCharge Studio -> ASP

 Loop through editable grid control values only where field value isn't blank

Print topic Send  topic

Author Message

Posts: 39
Posted: 09/24/2010, 9:45 AM

I'm using the Add A Row function for an editable grid, so that users can "add a row" by clicking a button, which essentially shows another blank row.

I need to loop through the values on the confirmation button on several of the fields and check them against regular expressions in javascript. I'm using Nicole's advice for looping through control values:

Right now, I'm getting the values for every field, whether blank or filled. How can I loop through only those where something is in the text box - for example, where class_end_time.value !== ""?

Here's the code I've got now on the submit button:

initClass_TimesElements();   for(var j = 0; j < Class_TimesElements.length; j++){    alert('End Time:' + Class_TimesElements[j][Class_TimesClass_End_TimeID].value);    }

This is what gives me the value of every row. I tried the advice of putting in the for statement: for(var j = 0; j < <form_name>Elements.length-<form_name>EmptyRows; j++)
but am getting no results, I think because it considers all my rows to be empty at this point.

Any ideas? Thanks.
View profile  Send private message

Add new topic Subscribe to topic   

These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

Home   |    Search   |    Members   |    Register   |    Login

Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by  and YesSoftware, Inc.