Bonjour a tous,j'ai beau chercher je ne vois pas le soucis. La console me dit document.forms.nomForm not properties.
C'est juste une fonction pour remplir un champ type hidden.
Si quelqu'un voit merci bcp![]()
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 <script language="javascript"> function ChampId(nomForm,Validetb,val) { document.forms['nomForm'].elements['Validetb'].value= val; } </script> <? require_once ('../definition.php'); require_once ('../scripts/fonctions.php'); require_once ('../scripts/bdd.php'); require_once ('../scripts/recherche.class.php'); list($an,$mois,$jour)=split('-',date2sql(time())); $Connexion= Connexion ($ServeurBDD, $UtilisateurBDD, $PassBDD, $BaseBDD); if($Connexion) { $i=0; $Sql="SELECT ETB_idEtablissement,ETB_NomEtablissement FROM ETABLISSEMENT WHERE ETB_contratEtablissement=1 AND ETB_clientActif=1 ORDER BY ETB_NomEtablissement ASC"; $Res=mysql_query($Sql); while($tab=mysql_fetch_assoc($Res)) { $tab_etb[$i]=$tab['ETB_NomEtablissement']; $tab_idetb[$i]=$tab['ETB_idEtablissement']; $i++; } Fermer($Connexion); } ?> <table width="90%" align="center" border="2"> <form name='f_dispoan' action="index.php?page=<?=AD_DISPOANVALID;?>" method="post"> <input type="hidden" name="id_Etb" value=""> <th align="center"><h2>Gestion des disponibilitées pour les hébergements à l'année</h2></th> <tr> <td><b>Choix de l'établissement : </b> <select name="ChoixEtb" align="center" onChange="javascript:ChampId('f_dispoan','id_Etb',this.value)">; <? for($i=0;$i<count($tab_etb);$i++) {?> <option value="<?=$tab_idetb[$i]?>"><?=strtolower($tab_etb[$i])?></option> <? }?> </select> </td> </tr> <tr> <td><b>Choix de l'année : </b> <select name="ChoixAn" align="center">; <? for($i=$an;$i<=($an+2);$i++) {?> <option value="<?=$i?>"><?=$i?></option> <? }?> </select> </td> </tr> <tr> <td> <b>Nombre de disponibilité a attribuer : </b> <input type="text" name="nbdispo" size="4" value="0"> </td> </tr> <tr> <td align="center"> <input type="submit" align="right" class="bouton" value="Valider"> </td> </tr> </form> </table>
Partager