form validation using javascript in changing input tags
<p>I need to validate a form using JavaScript. The form keep changes since I am using data from a field name table to print each field (like name, address, phone no.). I'm using a loop to print the label for field and corresponding text input tag. (eg. name : textbox to enter name, phone no : textbox to enter phone no.) And at last getting these values in an array when submitting the form and entering into details table.</p>

<p>Following is the code for printing each field and text box:</p>

<pre><code>while ($row=mysql_fetch_array($result)){
    echo'&lt;labelfor='.$row['field_name'].'name=field_id&gt;'.$row['field_name'].':&lt;/label&gt;';                        
    echo'&lt;inputtype="text" name=field_name[]id="'.$row['field_id'].'":value="'.$row['field_value'].'" size="20" class = "inpBox" &gt;';
}
</code></pre>

<p>Now I need to check whether these fields are empty using JavaScript and then change the style of that particular text box. Any help will be greatly appreciated.</p>
