PDA

View Full Version : Accessing checkbox inside a table


rshgeneral
06-28-2009, 07:57 PM
How does one access the status of checkbox input that is added to a table. I've done this:


//CurrrentCart is a table
newckbox = document.createElement("input");
newckbox.setAttribute("type", "checkbox");
newckbox.checked = false;
CurrentCart.rows[index].cells[4].appendChild(newckbox);


I've tried CurrentCart.rows[index].cells[4].checked, CurrentCart.rows[index].cells[4].innerHTML.

What do I need?

rshgeneral
06-28-2009, 08:33 PM
CurrentCart.rows[i].cells[4].childNodes[0].checked