i have this code using javascript. where i use for loop in evaluating the text box if it has content or none.
this is the code:
function validateTable()
{
var rowCount = $('#mhTable >tbody >tr').length;
//alert(rowCount);
for(var ctr = 1; ctr <= rowCount; ctr++)
{
if( $('input[name^="process['+ctr+']"]').val() != '' )
{
continue;
}
else if( $('input[name^="process['+ctr+']"]').val() == '' )
{
messagealertManhourCheck("Error","Please fill out the form");
}
}
SaveSavingsData();
}
my problem is when there are many textboxes and if one of the textbox do not have any content. it will still go in the function saveSavingsData();
but it must be error.