Podaje kod, działający (IE,Fox,Chrome):
<script LANGUAGE="JavaScript"> function SetValues(Form, CheckBox, Value) { var objCheckBoxes = document.forms[Form].elements[CheckBox]; var countCheckBoxes = objCheckBoxes.length; for(var i = 0; i < countCheckBoxes; i++) objCheckBoxes[i].checked = Value; } </script> <form name="sports" method="post" action="insert.php"> <table border = "1" cellpadding = "5"> <tr> <input type="button" value="Zaznacz wszystkie" onclick="SetValues('sports', 'boxes[]', true);"> <input type="button" value="Odznacz wszystkie" onclick="SetValues('sports', 'boxes[]', false);">
Prośba o przerobienie na jeden przycisk (Zaznacz/Odznacz)