I hack js no need to change in php :

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var checkflag = "false";
// on va se ballader parmis les elements de formualire et toucher
// au case a cocher
function check(formulaire) {
if (checkflag == "false") {
for (i = 0; i < formulaire.length; i++) {
    if (formulaire.elements[i].type.toLowerCase() == 'checkbox') {
        formulaire.elements[i].checked = true;
    }
}
checkflag = "true";
return "Nulpart"; }
else {
for (i = 0; i < formulaire.length; i++) {
    if (formulaire.elements[i].type.toLowerCase() == 'checkbox') {
        formulaire.elements[i].checked = false;
    }
}
checkflag = "false";
return "Partout"; }
}
</script>


I pass teh form to the function and scan its elements



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to