I have a rather strange situation where I try to iterate through checkboxes using each
. The problem is that he does not want to go in a loop.
Please advise why?
This is a function.
function AddTheProduct() { var txtTopicsGuids = ""; var checkedTopics = document.getElementsByName("chkRelatedTopics"); $(checkedTopics).each(function() { if ($(this).is(":checked")) {
and markup
{{each Items}} <tr> <td> <input type='hidden' name='hidTopicsDomain' value='${DomainObjectKey}'/> <input type='checkbox' name='chkRelatedTopics' value='${subject}'/> </td> </tr> {{/each}}
source share