Hi All i am doing this check to see if any check boxes have been selected or not before the user hits on the submit button. It works fine if there are more then 1 row displayed on my page..If no selections have been made then the alert box comes up with "Please make a selections."
But if theres only one row displayed this fails.. Any suggestion where am going wrong??? function checker() { var choices = 0; var type = confirm("Are you sure you want to preview the Carton Details?"); if (type) { for (counter = 0; counter < cartonquery.cartonselect.length; counter++){ if (cartonquery.cartonselect[counter].checked){ choices = choices + 1; } } if (radio_choices < 1 ) { alert("Please make a selections. \n") return (false); } alert("am after if"); } else { return false; } return (true); } thanks in advance -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>