HI, The folwing code is not working. If i am giving "labels" it working. when i change to labels[]" then its not working. Bcos i have to use "labels[]" then only PHP is taking the values. Please help me. < input type="checkbox" name="labels[]" value="spring">Spring <input type="checkbox" name="labels[]" value="hibernate">Hibernate <input type="checkbox" name="labels[]" value="seam">JBoss Seam <input type="checkbox" name="labels[]" value="javafx">JavaFX <input type="checkbox" name="labels[]" value="jsf">JSF Code (markup): for (i = 0; i < document.add_links.labels.length; i++) { if (document.add_links.labels[i].checked == true) { count++; } } Code (markup):
Try: var nBox = document.getElementsByName("labels[]"); for (i=0; i<nBox.length; i++) { if (nBox[i].checked) { alert("Box " + i + " is checked"); } } Code (markup):