Only applies to radio buttons and checkboxes, not dropdowns.
The javascript seems to be name based. One approach could be to simply remove the ID from checkboxes and radio buttons. Another would be to append tmpCount (which doesn’t seem to be doing anything) to the ID although this is not guarenteed to unique either.
I look forward to hearing what the others say about this.
Since the id attribute isn’t used for either the checkbox or radio button elements I think the best approach is to remove it. DOM selectors written in JavaScript can still match on the value attribute if they need to, and then later if a unique ID is required for some purpose then we can add it.
Although I personally don’t use them for checkboxes or radio buttons, I do often write custom edit.cfm files for the webtop so that I can write custom javascript which refers to form element ids (usually select dropdowns). Hopefully I won’t need to use the ids in the future for those elements