I am trying to create a checkbox dynamically using following HTML/JavaScript. Any ideas why it doesn\'t work?
The last line should read
cbh.appendChild(document.createTextNode(cap));
Appending the text (label?) to the same container as the checkbox, not the checkbox itself