apparait 3 fois.
Code : Sélectionner tout - Visualiser dans une fenêtre à part id="45"
Un id ne peut pas être dupliqué.
Renomme les autres. Mais je pense qu'il y a autre chose ...
A+
apparait 3 fois.
Code : Sélectionner tout - Visualiser dans une fenêtre à part id="45"
Un id ne peut pas être dupliqué.
Renomme les autres. Mais je pense qu'il y a autre chose ...
A+
Heu
Pourquoi as-tu ajouter un paramètre à la fonction : elle n'en a pas besoin
C'est ça l' "objet attendu"
A+
Ca vient pas du tout de l'id car sans id j'ai le même problème.Ligne 288 de ce code.
Ici tu remarqueras j'ai un véhicule sélectionné et j'ai que UN champs qui apparait .. Ça vient donc pas de la multiplicité de l'id
j'ai aussi donne a la valeur de l'id son nom ...
Ca ne change rien
Bon, je crois qu'on y est
Aucun de tes JS déclaré dans la page ne pouvaient marcher :Tu ne peux pas déclarer de fonctions dans une balise <script> qui sert à inclure un .js
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4 <SCRIPT SRC="/includes/calendar.js" language='javascript' ></SCRIPT> <script type="text/javascript"> function creerRequete() { ....
Il faut une balise pour l'include, et une autre pour le code JS de la page
A+
alors oui c'est vrai que mon script de vérification du formulaire ne marche plus (il a marché un temps mais sans raison il a arrêter) ..
mais ce n'est pas ca ..
Toujours le meme souci au niveau du premier input
j'ai supprimer des trucs et ca me donne ca pour le JS :
et plus complet :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 <SCRIPT type="text/javascript" SRC="/includes/calendar.js" language='javascript'> function VerifSaisie() { if ( document.saisie.dat.value == "") { alert("\nVous devez saisir une date.\n\n") return false; } else if ( document.saisie.km.value == "") { alert("\nVous devez saisir un kilometre.\n\n") return false; } else if ( document.saisie.evenement.value == "") { alert("\nVous devez saisir un evenement.\n\n") return false; } else if ( document.saisie.prestataire.value == "") { alert("\nVous devez saisir un prestataire.\n\n") return false; } else if ( document.saisie.montant.value == "") { alert("\nVous devez saisir un montant.\n\n") return false; } else if ( document.saisie.nb_heure.value == "") { alert("\nVous devez saisir le nombre d'heure.\n\n") return false; } } function valide_choix(){ document.Materiel.submit(); } function test_chckbx() { var chkbx = document.forms['affichage'].getElementsByTagName("input"); for (var i=0; i<chkbx.length; i++) // Parcours les input du form if (chkbx[i].type=="checkbox") // Ne traite que les checkbox if (chkbx[i].checked) {// Si une cochée document.getElementById('validation').style.visibility = "visible"; // Affiche le bouton return true; // Fin de la fonction } document.getElementById('validation').style.visibility = "hidden"; // Si aucune trouvée => masque le bouton } </SCRIPT>
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270 <html> <head> <title>Gestion du Parc : Saisie des Evenements</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <SCRIPT type="text/javascript" SRC="/includes/calendar.js" language='javascript'> function VerifSaisie() { if ( document.saisie.dat.value == "") { alert("\nVous devez saisir une date.\n\n") return false; } else if ( document.saisie.km.value == "") { alert("\nVous devez saisir un kilometre.\n\n") return false; } else if ( document.saisie.evenement.value == "") { alert("\nVous devez saisir un evenement.\n\n") return false; } else if ( document.saisie.prestataire.value == "") { alert("\nVous devez saisir un prestataire.\n\n") return false; } else if ( document.saisie.montant.value == "") { alert("\nVous devez saisir un montant.\n\n") return false; } else if ( document.saisie.nb_heure.value == "") { alert("\nVous devez saisir le nombre d'heure.\n\n") return false; } } function valide_choix(){ document.Materiel.submit(); } function test_chckbx() { var chkbx = document.forms['affichage'].getElementsByTagName("input"); for (var i=0; i<chkbx.length; i++) // Parcours les input du form if (chkbx[i].type=="checkbox") // Ne traite que les checkbox if (chkbx[i].checked) {// Si une cochée document.getElementById('validation').style.visibility = "visible"; // Affiche le bouton return true; // Fin de la fonction } document.getElementById('validation').style.visibility = "hidden"; // Si aucune trouvée => masque le bouton } </SCRIPT> <link rel="stylesheet" type="text/css" href="/transco.css"></head><body> <table width="100%" height="100%" border="0"> <tr> <td width="106" height="110"> <div align="center"><img src="../Images/logo%20TS%20couleur.jpg" width="100" height="100"></div></td> <td width="1122"> <div align="center"><font size="6" face="Comic Sans MS" color="#FB764D"> Technique </font></div><div align='center'><font size='3' face='Comic Sans MS'> Agence Transcosatal Atlantique </font> <BR> <font size='2' face='Comic Sans MS'>(Vous êtes connecté avec le compte Andrieux )</font></div> </td><td width="0"></td> </tr> <tr> <td height="100%" valign="top"> <BR> <script type="text/javascript" src="/includes/functions.js"></script> <div id="menu" > <div class="barre" ></div> <div class="menu" id="menu1" onClick="afficheMenu(this)" > <table><tr><td width='30px'><img src="/images/accueil.gif" width="25" height="25" border="0" alt="Accueil Intranet"></td><td width='90px' align='center'><a href="/index.asp">Accueil Intranet</a></td></tr></table> </div> <div class="menu" id="menu2" onClick="afficheMenu(this)" > <table><tr><td width='30px'><img src="/Images/commerce.jpg" alt="Commerce" width="30" height="20" border="0"></td><td width='90px' align='center'><a href="../Parc/index.asp">Liste du parc</a></td></tr></table> </div> <div class="menu" id="menu3" onClick="afficheMenu(this)" > <table><tr><td width='30px'><img src="../Images/compteur.jpg" width="20" height="20" border="0"></td><td width='90px' align='center'><a href="../Parc/saisieKM.asp">Saisie des KM</a></td></tr></table> </div> <div class="menu" id="menu8" onClick="afficheMenu(this)" > <table><tr><td width='30px'><img src="../Images/compteur.jpg" width="20" height="20" border="0"></td><td width='90px' align='center'><a href="../Parc/SaisieEvenementR.asp">Saisie des Evenements</a></td></tr></table> </div> <div class="menu" id="menu4" onClick="afficheMenu(this)" > <table><tr><td width='30px'><img src="../Images/calc.gif" width="20" height="20" border="0"></td><td width='90px' align='center'><a href="../Parc/consultKM.asp">Consultation des KM</a></td></tr></table> </div> <div class="menu" id="menu5" onClick="afficheMenu(this)" > <table><tr><td width='30px'><img src="../Images/Excel.gif" width="20" height="20" border="0"></td><td width='90px' align='center'><a href="../Parc/exports.asp">Exportation Excel</a></td></tr></table> </div> <div class="menu" id="menu6" onClick="afficheMenu(this)" > <table><tr><td width='30px'><img src="../Images/search.gif" width="20" height="20" border="0"></td><td width='90px' align='center'><a href="../Parc/searchMat.asp">Recherche Materiel</a></td></tr></table> </div> <div class="menu" id="menu9" onClick="afficheMenu(this)" > <table><tr><td width='30px'><img src="../Images/search.gif" width="20" height="20" border="0"></td><td width='90px' align='center'><a href="../Parc/searchEve.asp">Recherche Evenement</a></td></tr></table> </div> <div class="menu" id="menu7" onClick="afficheMenu(this)" > <table><tr><td width='30px'><img src="../Images/facture.gif" width="20" height="20" border="0"></td><td width='90px' align='center'><a href="../Parc/facturation.asp">Facturation</a></td></tr></table> </div> </div> </td> <td valign="top"> <div align="center"><font color="#fb764b" size="5" face="Comic Sans MS">Saisie des Evenements</font><BR> <form name="Materiel" method="post" action="SaisieEvenementR.asp"> <input name="op" type="hidden" id="op" value="mat"> <select name="materiel" id="materiel" onchange="document.Materiel.submit();"> <option value=0 > - </option> <option value=487>033 - 116 BCG 44 (expert) ( PEUGEOT ) </option><option value=170>CLIO 66 - 277 SV 66(clio) ( RENAULT ) </option><option value=171>CLIO - 3965 SP 76(clio) ( RENAULT ) </option><option value=484>022 - 5825 ZD 44(308DE) ( MERCEDES ) </option><option value=483>019 - 603 ZE 44(R19) ( RENAULT ) </option><option value=485>024 - 662 ADW 44(express) ( RENAULT ) </option><option value=355>MM - 680 BTJ 44(CRV) ( HONDA ) </option><option value=56>MJ - 77 AGS 13(307-MJP) ( PEUGEOT ) </option><option value=486>CLIO44 - 928 AFY 44 (Clio) ( RENAULT ) </option><option value=488>FD - 997 BNC 44(REXTON) ( REXTON ) </option><option value=415>138 - 138-179 BKT 44 ( VOLVO ) </option><option value=418>140 - 140-347 BLE 44 ( VOLVO ) </option><option value=419>141 - 141- 101 BLE 44 ( DAF ) </option><option selected value=422>145 - 145-787 BLT 44 ( DAF ) </option><option value=424>147 - 147-688 BMW 44 ( VOLVO ) </option><option value=425>148 - 148-818 BNV 44 ( DAF ) </option><option value=426>149 - 149-825 BNV 44 ( DAF ) </option><option value=427>150 - 150-787 BPD 44 ( DAF ) </option><option value=429>151 - 151-252 BPK 44 ( DAF ) </option><option value=430>154 - 154-81 BQC 44 ( DAF ) </option><option value=433>158 - 158-835 BVY 44 ( DAF ) </option><option value=436>160 - 160-714 BWS 44 ( DAF ) </option><option value=437>161 - 161-411 BXB 44 ( DAF ) </option><option value=431>255 - 255-113 BVV 44 ( VOLVO ) </option><option value=432>256 - 256-96 BVV 44 ( VOLVO ) </option><option value=435>257 - 257-106 BVV 44 ( VOLVO ) </option><option value=434>259 - 259-748 BWP 44 ( VOLVO ) </option><option value=438>262 - 262-308 BXF 44 ( VOLVO ) </option><option value=439>263 - 263-413 BXH 44 ( VOLVO ) </option><option value=620>LOC 2 49 - 2666 XK 02 ( RENAULT ) </option><option value=617>LOC 3 44 - 2751 XP 22 ( VOLVO ) </option><option value=618>LOC 4 44 - 2752 XP 22 ( VOLVO ) </option><option value=166>304 - 304-3313 XL 76 ( VOLVO ) </option><option value=161>310 - 310-7021 XH 76 ( VOLVO ) </option><option value=532>316 - 316-4136 ZV 76 ( VOLVO ) </option><option value=530>317 - 317-4133 ZV 76 ( VOLVO ) </option><option value=531>318 - 318-4134 ZV 76 ( VOLVO ) </option><option value=537>319 - 319 - 9497 ZV 76 ( VOLVO ) </option><option value=538>320 - 320 - 9492 ZV 76 ( VOLVO ) </option><option value=539>321 - 321 - 9495 ZV 76 ( VOLVO ) </option><option value=540>322 - 322 - 9489 ZV 76 ( VOLVO ) </option><option value=541>323 - 323 - 9503 ZV 76 ( VOLVO ) </option><option value=542>324 - 324 - 9509 ZV 76 ( VOLVO ) </option><option value=567>325 - 325-648 ADM 76 ( VOLVO ) </option><option value=570>326 - 326-671 ADM 76 ( VOLVO ) </option><option value=569>327 - 327-670 ADM 76 ( VOLVO ) </option><option value=568>328 - 328-665 ADM 76 ( VOLVO ) </option><option value=571>329 - 329-672 ADM 76 ( VOLVO ) </option><option value=572>330 - 330-453 ADZ 76 ( VOLVO ) </option><option value=573>331 - 331-456 ADZ 76 ( VOLVO ) </option><option value=574>332 - 332-441 ADZ 76 ( VOLVO ) </option><option value=575>333 - 333-446 ADZ 76 ( VOLVO ) </option><option value=576>334 - 334-458 ADZ 76 ( VOLVO ) </option><option value=619>LOC 1 49 - 5316 XB 85 ( DAF ) </option><option value=615>LOC 1 44 - 57 AYM 35 ( VOLVO ) </option><option value=442>740 - 740H*-3593 ZM 44 ( FRUEHAUF ) </option><option value=443>741 - 741H*-167 ZS 44 ( FRUEHAUF ) </option><option value=444>742 - 742H*-1475 ZX 44 ( FRUEHAUF ) </option><option value=445>743 - 743*B-168 ABV 44 ( FRUEHAUF ) </option><option value=446>744 - 744H*-459 ACB 44 ( FRUEHAUF ) </option><option value=448>745 - 745H-251 ACR 44 ( CHEREAU ) </option><option value=460>761 - 761-786 AGD 44 ( SCHMITZ ) </option><option value=462>763 - 763-199 AGV 44 ( SCHMITZ ) </option><option value=463>764 - 764-190 AGV 44 ( SCHMITZ ) </option><option value=465>765 - 765-198 AGV 44 ( SCHMITZ ) </option><option value=464>766 - 766H*-607 BGW 44 ( TRAILOR ) </option><option value=466>767 - 767H*-836 AJZ 44 ( TRAILOR ) </option><option value=417>773 - 773H-404 AYS 44 ( SAMRO ) </option><option value=469>774 - 774H-402 AYS 44 ( SAMRO ) </option><option value=470>775 - 775-871 BHJ 44 ( LAMBERET ) </option><option value=471>776 - 776-877 BHJ 44 ( LAMBERET ) </option><option value=472>777 - 777-869 BHJ 44 ( LAMBERET ) </option><option value=473>778 - 778B-896 BHJ 44 ( SCHMITZ ) </option><option value=474>779 - 779-925 BHJ 44 ( SCHMITZ ) </option><option value=475>780 - 780-970 BMQ 44 ( LECI TRAILOR ) </option><option value=476>781 - 781H-794 BND 44 ( LECI TRAILOR ) </option><option value=477>782 - 782H-49 BQC 44 ( SAMRO ) </option><option value=478>783 - 783H-32 BQC 44 ( SAMRO ) </option><option value=479>784 - 784H-843 BVX 44 ( SAMRO ) </option><option value=480>785 - 785H-436 BWG 44 ( SAMRO ) </option><option value=481>786 - 786H-26 BXN 44 ( SAMRO ) </option><option value=482>787 - 787H-830 BYY 44 ( SAMRO ) </option><option value=146>801 - 801-402 TL 76 ( CHEREAU ) </option><option value=148>802 - 802-409 TM 76 ( LAMBERET ) </option><option value=149>803 - 803-432 TM 76 ( LAMBERET ) </option><option value=150>804 - 804-445 TM 76 ( LAMBERET ) </option><option value=145>806 - 806-1761 TJ 76 ( CHEREAU ) </option><option value=156>807 - 807-1774 TJ 76 ( TRAILOR ) </option><option value=151>810 - 810-6903 TK 76 ( LAMBERET ) </option><option value=152>811 - 811-8202 TL 76 ( LAMBERET ) </option><option value=155>812 - 812-8270 TL 76 ( LAMBERET ) </option><option value=320>813 - 813-8274 TL 76 ( LAMBERET ) </option><option value=517>814 - 814-1552 ZT 76 ( CHEREAU ) </option><option value=513>815 - 815-1566 ZT 76 ( CHEREAU ) </option><option value=511>816 - 816-1563 ZT 76 ( CHEREAU ) </option><option value=512>817 - 817-1567 ZT 76 ( CHEREAU ) </option><option value=514>818 - 818-1561 ZT 76 ( CHEREAU ) </option><option value=515>819 - 819-1560 ZT 76 ( CHEREAU ) </option><option value=516>820 - 820-1556 ZT 76 ( CHEREAU ) </option><option value=519>821 - 821-2450 ZT 76 ( CHEREAU ) </option><option value=588>822 - 822 - 217 AFK 76 ( CHEREAU ) </option><option value=610>823 - 823 - 92 AFQ 76 ( CHEREAU ) </option><option value=611>824 - 824 - 94 AFQ 76 ( CHEREAU ) </option><option value=605>825 - 825 - 96 AFQ 76 ( CHEREAU ) </option><option value=607>826 - 826 - 519 AFR 76 ( CHEREAU ) </option><option value=608>827 - 827 - 950 AFS 76 ( CHEREAU ) </option><option value=609>828 - 828 - 946 AFS 76 ( CHEREAU ) </option><option value=612>829 - 829 - 876 AGB76 ( CHEREAU ) </option><option value=616>LOC 2 44 - 914 BBH 35 ( VOLVO ) </option><option value=579>TS 66 02 - ALLONNES ( AUTRE ) </option><option value=580>MANUT - MANUT ( AUTRE ) </option><option value=577>NAULET 1 - NAULET ( AUTRE ) </option><option value=581>757 - NON AFFECTE ( AUTRE ) </option><option value=578>0204 - REFACT ( AUTRE ) </option> </select> </form> </div> <HR> <div align='center'><font face='Comic Sans MS'>Materiel : 145-787 BLT 44</font> </div> <HR> <table width='100%' border='0' cellspacing='0'> <tr> <td width='80'>Evenement </td> <td > <form name='ajoutev' method='post' action=''> <button onClick="document.getElementById(2).style.display='';"> <img src='/Images/plus1.gif' width='15' border='0'> </button> <div id=2 style="display:none;"> <input type='text' name='new_evt'> <input type='submit' value='Ajouter un evenement'> </div> </form> <tr> <td width='80'>Prestataire</td> <td> <form name='ajoutps' method='post' action=''> <button onClick="document.getElementById(3).style.display='';"> <img src='/Images/plus1.gif' width='15' border='0'> </button> <div id=3 style="display:none;"> <input type='text' name='new_pst'> <input type='submit' value='Ajouter un prestataire'> </div> </form> </td></tr> </table> <form name='saisie' method='post' action='SaisieEvenementR.asp' onSubmit='return VerifSaisie()'> <table width='100%' border='0' cellspacing='0'> <tr> <td align='center'>Date</td> <td align='center'>Km</td> <td align='center'>Evenement </td> <td align='center'>Prestataire </td> <td align='center'>Cout </td> <td align='center'>Temps en minutes</td> <td align='center'>Commentaire</td> </tr> <tr> <td align='center' > <input name='dat' size=7 onfocus='this.select();lcs(this)' onclick='event.cancelBubble=true;this.select();lcs(this)' value''> </td> <td align='center' > <input name='km' size=5 value=''> </td> <td align='center'> <select name='evenement' value=''> <option value=1>Accident</option><option value=4>Destruction</option><option value=6>Vidange</option><option value=9>Contrôle technique</option><option value=52>divers</option><option value=53>Hayon</option><option value=54>Moteur</option><option value=55>Frein</option><option value=56>Depannage</option><option value=57>Carrosserie</option><option value=59>Pneu</option><option value=60>Groupe</option> </select> </td> <td align='center' > <select name='prestataire' value=''> <option value=5>Fredo</option><option value=6>camille</option> </select> </td> <td align='center'> <input name='montant'size=3 value=''> </td> <td align='center' > <input name='nb_heure' size=3 value=''> </td> <td align='center' > <textarea rows="4" cols="33" name='commentaire' ></textarea> </td> <td align='center'> <input name='op' type='hidden' id='op' value='ajout'> <input name='materiel' type='hidden' id='materiel' value='422'> <input name='Submit2' type='submit' size=8 value='Enregistrer' > </td> </tr> </table> </form> <form name='affichage' method='post' action=''> <table width="100%" border="1" cellspacing="0"> <tr> <td height="10"><div align="center" style="font-weight: bold">Date</div></td> <td height="10"><div align="center" style="font-weight: bold">Km</div></td> <td height="10"><div align="center" style="font-weight: bold">Evenement</div></td> <td height='10'><div align="center" style="font-weight: bold">Prestataire</div></td> <td height='10'><div align="center" style="font-weight: bold">Cout </div></td> <td height='10'><div align="center" style="font-weight: bold">Nombre d'heures</div></td> <td height='10'><div align="center" style="font-weight: bold">Commentaire</div></td> <td height='10'><div align="center" style="font-weight: bold">Supp</div></td> </tr> <tr><td><div align='center'>12/02/2009</div></td><td><div align='center'>566210</div></td><td><div align='center'>divers</div></td><td><div align='center'>camille</div></td><td><div align='center'>0</div></td><td><div align='center'>90</div></td><td><div align='center'>Contrôle éclairage remplacement cabochon feu ARD refixer bavette AR</div></td> <td align='center' > <input id='supp0' type='checkbox' name='supp0' onclick='test_chckbx();'> </td> </tr><tr><td><div align='center'>11/02/2009</div></td><td><div align='center'>566210</div></td><td><div align='center'>Moteur</div></td><td><div align='center'>camille</div></td><td><div align='center'>0</div></td><td><div align='center'>600</div></td><td><div align='center'>Remplacement enbrayage </div></td> <td align='center' > <input id='supp1' type='checkbox' name='supp1' onclick='test_chckbx();'> </td> </tr><tr><td><div align='center'>09/02/2009</div></td><td><div align='center'>566210</div></td><td><div align='center'>Moteur</div></td><td><div align='center'>camille</div></td><td><div align='center'>0</div></td><td><div align='center'>180</div></td><td><div align='center'>demontage boite </div></td> <td align='center' > <input id='supp2' type='checkbox' name='supp2' onclick='test_chckbx();'> </td> </tr><tr><td><div align='center'>09/02/2009</div></td><td><div align='center'>566210</div></td><td><div align='center'>Moteur</div></td><td><div align='center'>Fredo</div></td><td><div align='center'>0</div></td><td><div align='center'>210</div></td><td><div align='center'>Preparation demontage boite</div></td> <td align='center' > <input id='supp3' type='checkbox' name='supp3' onclick='test_chckbx();'> </td> </tr> <tr> <td></td><td></td><td></td><td></td><td></td><td></td><td></td> <td align='center'><input id='validation' name='validation' type='submit' value='Valider' style="visibility:hidden;"></td> </tr> </table> </form> <p> </p></td> </tr> <tr> <td height="100%" valign="top"> </td> <td></td> </tr> </table> </body> </html> <script language='JavaScript'> document.Materiel.materiel.focus(); </script>
Ca marche nickel
Merci infiniment....
Reste plus qu' à affecter a mon bouton valider la requête de suppression des checkbox cochées....
Vous avez un bloqueur de publicités installé.
Le Club Developpez.com n'affiche que des publicités IT, discrètes et non intrusives.
Afin que nous puissions continuer à vous fournir gratuitement du contenu de qualité, merci de nous soutenir en désactivant votre bloqueur de publicités sur Developpez.com.
Partager