View Full Version : Create Table Based On Checked Checkboxes

09-28-2012, 05:24 PM
Hello everyone!

I have a webpage with a large series of checkboxes. The user is able to check as many or as few checkboxes as they like. I'm trying to add a button that will create a table of all checked checkboxes on the same page. I am new to JavaScript and I cannot find any information regarding creating tables in this manner, so any help with a way to go about this would be greatly appreciated.

09-28-2012, 05:34 PM
you mean you want the table to have clones of the checked checkboxes? or populate the table with the values of the checked checkboxes? or make the unchecked checkboxes disappear? sorry, I'm lost...

09-29-2012, 12:33 AM
createElement() (https://developer.mozilla.org/en-US/docs/DOM/document.createElement) allows the dynamic creation of elements.

You can use the checked() (http://www.w3schools.com/jsref/prop_checkbox_checked.asp) method on each of your checkboxes to see if they're checked or not.