A
Andrew Banks
I'm using the following code to fill in data in 52 form fields but I think
I've got a problem when I'm trying to concatenate my variables with the
names of form fields. Can anyone help?
var ThursArray = new
Array("01-01-04","08-01-04","15-01-04","22-01-04","29-01-04","05-02-04","12-
02-04","19-02-04","26-02-04","04-03-04","11-03-04","18-03-04","25-03-04","01
-04-04","08-04-04","15-04-04","22-04-04","29-04-04","06-05-04","13-05-04","2
0-05-04","27-05-04","03-06-04","10-06-04","17-06-04","24-06-04","01-07-04","
08-07-04","15-07-04","22-07-04","29-07-04","05-08-04","12-08-04","19-08-04",
"26-08-04","02-09-04","09-09-04","16-09-04","23-09-04","30-09-04","07-10-04"
,"14-10-04","21-10-04","28-10-04","04-11-04","11-11-04","18-11-04","25-11-04
","02-12-04","09-12-04","16-12-04","23-12-04","30-12-04");
function SetDates(ArrayToUse){
for (i=0; i < ArrayToUse.length; i++){
//alert(ArrayToUse);
//alert("I is " + i + " Thurs array is " + ThursArray);
document.add_record_form.date + i + .value = ArrayToUse;
}
}
I've got a problem when I'm trying to concatenate my variables with the
names of form fields. Can anyone help?
var ThursArray = new
Array("01-01-04","08-01-04","15-01-04","22-01-04","29-01-04","05-02-04","12-
02-04","19-02-04","26-02-04","04-03-04","11-03-04","18-03-04","25-03-04","01
-04-04","08-04-04","15-04-04","22-04-04","29-04-04","06-05-04","13-05-04","2
0-05-04","27-05-04","03-06-04","10-06-04","17-06-04","24-06-04","01-07-04","
08-07-04","15-07-04","22-07-04","29-07-04","05-08-04","12-08-04","19-08-04",
"26-08-04","02-09-04","09-09-04","16-09-04","23-09-04","30-09-04","07-10-04"
,"14-10-04","21-10-04","28-10-04","04-11-04","11-11-04","18-11-04","25-11-04
","02-12-04","09-12-04","16-12-04","23-12-04","30-12-04");
function SetDates(ArrayToUse){
for (i=0; i < ArrayToUse.length; i++){
//alert(ArrayToUse);
//alert("I is " + i + " Thurs array is " + ThursArray);
document.add_record_form.date + i + .value = ArrayToUse;
}
}