hello
im newbie hereim not good in javascript but i need this code
i want a function check if 3 checkboxes are checked
and if they checked then it's will disable other checkboxes!
as i say im not good in javascript.. this is my try:
i put onclick="check_disable(this);" in each checkboxCode:function check_disable(box) { var index = 0; for(var i=0;i<box.form.elements.length;i++) { if(box.form.elements[i].checked == true) {index = index + 1;} else if(box.form.elements[i].checked == false) {index = index - 1;} } if(index >= 3) { for(i=0;i<box.form.elements.length;i++) { box.form.elements[i].disabled = !box.checked; } } } --> </script>
this not work
any help please
thanks



im not good in javascript but i need this code
Reply With Quote

Bookmarks