Ne pas cocher toutes mes cases
Bonjour,
Dans ma JSP j'ai plusieurs tableau et la fameuse option Tout cocher pour chaque tableau mais le souci c'est que lorsque je fait Tout cocher il me coche toutes les cases de tous mes tableau
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
|
<nested:iterate property="listDataExportRdv" id="idListDataExportRdv">
<table class="model2" style="font-size:100%" id="tableau">
<thead>
<tr>
<th colspan="8">
<b>Semaine <bean:write name="GererExporterRendezVousIDFBean" property="semaine1"/> / </b>
<b>Semaine <bean:write name="GererExporterRendezVousIDFBean" property="semaine2"/></b>
</th>
<th>
<button class="boutonForm" onclick="soumettre('chercherRDV');" >Exporter</button>
</th>
</tr>
<tr>
<th colspan="9">
<b><bean:write name="idListDataExportRdv" property="zone.code"/></b>
</th>
</tr>
<tr>
<th>Site</th>
<th>Prestataire</th>
<th>Nombre rdv positionné sur la semaine précédente</th>
<th>Nombre places en rdv individuel</th>
<th>Nombre places en accueil collectif</th>
<th>Nombre places demandées S1</th>
<th>Nombre places demandées S2</th>
<th>Cliquez sur ce bouton pour modifier le paramètre de la ligne correspondante</th>
<th>
Cocher
<a href="javascript:checkall('GererExporterRendezVousIDFBean','exportSelect',true)">Tous</a>
/
<a href="javascript:checkall('GererExporterRendezVousIDFBean','exportSelect',false)">Aucun</a>
</th>
</tr>
</thead>
<nested:iterate property="listDataExportRdvIdf" id="idList" indexId="indexList">
<tr id="${indexList}">
<td>
<bean:write name="idList" property="site.code"/>
</td>
<td>
<bean:write name="idList" property="prestataire.code"/>
</td>
<td>
<bean:write name="idList" property="orientesSemaine"/>
</td>
<td>
<bean:write name="idList" property="nbRdv"/>
</td>
<td>
<bean:write name="idList" property="nbRdvInfoColl"/>
</td>
<td>
<nested:text property="nombreRdvAVenirS1" size="8"/>
</td>
<td>
<nested:text property="nombreRdvAVenirS2" size="8"/>
</td>
<td>
<a href="javascript:modification('Modifier',${indexList},<bean:write name="idListDataExportRdv" property="zone.idZone"/>)">Modifier</a>
<%-- <button onclick="soumettre('Modifier',<bean:write name="idList" property="site.idSite"/>,<bean:write name="idList" property="prestataire.idPrestataire"/>,${indexList})">Modifier</button> --%>
</td>
<td>
<html:multibox name="GererExporterRendezVousIDFBean" property="exportSelect">
${indexList},<bean:write name="idListDataExportRdv" property="zone.idZone"/>
</html:multibox>
</td>
</tr>
</nested:iterate>
<tfoot>
<tr>
<td colspan="2">
Total pour la zone
</td>
<td>
<bean:write name="idListDataExportRdv" property="totalOrientesSemaine"/>
</td>
<td>
<bean:write name="idListDataExportRdv" property="totalNbPlacesRdvIndividuel"/>
</td>
<td>
<bean:write name="idListDataExportRdv" property="totatNbPlacesAccueilCollectif"/>
</td>
<td>
<bean:write name="idListDataExportRdv" property="nbDemandeesS1"/>
</td>
<td>
<bean:write name="idListDataExportRdv" property="nbDemandeesS2"/>
</td>
<td>
</td>
</tr>
</tfoot>
</table>
</nested:iterate> |
le javascript
Code:
1 2 3 4 5 6 7 8 9 10 11
|
/*
Permet de cocher toutes les cases d'un formulaire
etat : true | false
*/
function checkall(formname,checkname,etat){
var list=document.getElementsByName(checkname);
for (c=0;c<list.length;c++)
list[c].checked=etat;
} |
Ne pas cocher toutes mes cases
Bonjour,
Tu peux créer tes cases avec un chiffre, une codification appropriée exemple : case001, case002, case101...... et puis extraire les caractères de façon à contrôler tes tableaux. le premier chiffre est pour tableau, les deux autres sont par les cases. tableau 0, case 01 et 02, puis tableau 1, case 01...etc