PDA

View Full Version : control loop difficulty


crmpicco
07-18-2005, 02:52 PM
for(x=1;x<nochd;x++)
{

chd_length[x] = document.form.chdbirthday[x].value.length

if((Math.ceil(chd_length[x])<8)&&(Math.round(chd_length[x])!=0)
{
CHD_do_not_check_full_dob=true; // CHD DOB has INCORRECT value (not DDMMYYYY)
}
if(Math.ceil(chd_length[x])==8)
{
CHD_do_not_check_full_dob=false; // CHD DOB is in correct format
}


}


How can i create this code and reference it in the code by using the control loop variable (x) as the changing element?