A voir également:
- Checkbox liées cochées automatique JavaScript
- [Bug] Déconnexion automatique, Javascript... ✓ - Forum - Bugs et suggestions CCM
- Excel, probleme checkbox non cochees... ✓ - Forum - Programmation
- Formulaire envoi automatique (javascript) ✓ - Forum - Javascript
- Javascript formulaire calcul automatique ✓ - Forum - Javascript
- Excel - Création automatique de cases à cocher liées aux cellules en-dessous - Conseils pratiques - Visual Basic
3 réponses
sapma
Modifié par sapma le 17/06/2010 à 15:11
- Messages postés
- 168
- Date d'inscription
- vendredi 20 novembre 2009
- Statut
- Membre
- Dernière intervention
- 7 juin 2011
Modifié par sapma le 17/06/2010 à 15:11
je pense qu'il te faut un ID pour les checkbox et utiliser GetElementById ...
à voir : https://forums.commentcamarche.net/forum/affich-18104160-php-comment-verifier-si-une-case-est-cochee
à voir : https://forums.commentcamarche.net/forum/affich-18104160-php-comment-verifier-si-une-case-est-cochee
Je ne m'explique pas pourquoi la partie fonctionne et pas la seconde: (la seule différence, c'est le name des checkbox qui passe en tableau.
<form name="form4"> <input name="" type="checkbox" onclick=" this.form.localisation1.checked=this.checked this.form.localisation2.checked=this.checked" value="" />Tout cocher/décocher qui fonctionne<br /><br /> <input type="checkbox" name="localisation1" value="1">Concorde<br /> <input type="checkbox" name="localisation2" value="2">chatelet<br /><hr /> <input name="" type="checkbox" onclick=" this.form.localisation[0].checked=this.checked this.form.localisation[1].checked=this.checked" value="" />Tout cocher/décocher qui ne fonctionne pas<br /><br /> <input type="checkbox" name="localisation[0]" value="1">Concorde<br /> <input type="checkbox" name="localisation[1]" value="2">Chatelet<br /> </form>