Hi all
I've got the following HTML which has been looped around in smarty template language:
<td><input type="checkbox" name="confirmRelated[{$relatedIP.ipInt}_{$relatedIP.patternID}][confirm]" /></td>
<td><input type="hidden" name="confirmRelated[{$relatedIP.ipInt}_{$relatedIP.patternID}][ipInt]" value="{$relatedIP.ipInt}">{$relatedIP.robotIP}</td>
<td><input type="hidden" name="confirmRelated[{$relatedIP.ipInt}_{$relatedIP.patternID}][patternID]" value="{$relatedIP.patternID}">{$relatedIP.pattern}</td>
I'm trying to access the fields in javascript, but I'm having troubles with even the basics so far. Can anyone help?
var boxes = document.getElementsByName('confirmRelated');
alert(boxes.length);
That returns 0 at the moment, which is obviously wrong. I'm attempting to loop through all of them and check the checkbox "confirm" ones.
Any help appreciated.