I have the following basic function:
<script type="text/javascript">
function Form_Data(theForm)
{
var t=1;
while (t<=5) {
if (theForm.F[t]FirstName.value == "")
{
alert("Please enter Fighter 1's First Name.");
theForm.F[t]FirstName.focus();
return (false);
}
t++;
}
return (true);
}
</script>
The script (js validation) fails using this code. If I remove the [t] and replace with a number (1,2,3,4,etc), the validation works on the appropriate fields. What am I doing wrong?