Hello,

I wrote a php page which contains some input fields of type text which are generated by using a for loop in php. The names for the input fields are generated by appending the value incremented in the for loop in php. eg. st0,st1,st2-----. Now i need to check using javascript that some value is entered in the input fields. How can i do that using a for loop in javascript.

The php code i used to generate the text fields are:

<form name=f method=post action=test.php>
<?php
$count=5;
for($i =0;$i<count;$i++)
{
echo "<input type=text name="st".$i>";
}
?>
</form>


The html o/p for the above code will be:

<form name=f method=post action=test.php>
<input type=text name=st0>
<input type=text name=st1>
<input type=text name=st2>
<input type=text name=st3>
<input type=text name=st4>
</form>

How can i check that whether a value is entered into the fields or not in javascript.