mardi 10 mai 2016

Delete unchecked checkbox from database in JAVA

Hy,

I have database that inserting table row if checkbox is checked. In java servlet i call method that content database query.

How to delete row in database for checkbox that is unchecked?

THIS IS MY INPUT CODE IN JAVA:

if (onlyCheckIds.contains(p.getID())) {
                table.append("<td><span>Chx:</span><input class='chxActivate' type='checkbox'  id='chxActive' name='ID_"
                        + p.getID() + "' value='ON' checked></td>");
            } else {
                table.append("<td><span>>Chx UNCHECKED:</span><input  class='chxActivate' type='checkbox'  id='chxActive' name='ID_"
                        + p.getID() + "' value='OFF'  ></td>");
            }




Aucun commentaire:

Enregistrer un commentaire