T
terence.parker
I currently have the following JS in my header:
function checkall(thestate) {
var checkboxes=eval("document.forms.EssayList.file_id")
for (i=0;i<checkboxes.length;i++)
checkboxes.checked=thestate
}
This works fine - but the problem is that it doesn't work with my
checkboxes when they are set to name="file_id[]" . I have tried without
the parenthesis, and that works fine - so I guess that's the problem.
However I do need my POST to submit an array. (As a side question... is
there even a point using checkboxes but not submitting an array? If you
can only submit one item... why not use radio?) .
Is there a way around my problem?
Thanks,
Terence
function checkall(thestate) {
var checkboxes=eval("document.forms.EssayList.file_id")
for (i=0;i<checkboxes.length;i++)
checkboxes.checked=thestate
}
This works fine - but the problem is that it doesn't work with my
checkboxes when they are set to name="file_id[]" . I have tried without
the parenthesis, and that works fine - so I guess that's the problem.
However I do need my POST to submit an array. (As a side question... is
there even a point using checkboxes but not submitting an array? If you
can only submit one item... why not use radio?) .
Is there a way around my problem?
Thanks,
Terence