Bonjour,
J'ai passé mon select dans une datalist, et ma fonction ne réponds pas à mon alert() lors que je sélectionne un nom. une idée? merci

Code HTML : 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
            <div class="form-group col-md-4">
              <label for="Ville">Ville</label>
              <input list="ice-cream-flavors" id="ice-cream-choice" name="ice-cream-choice" class="form-control" />
              <datalist id="ice-cream-flavors">
                <select type="text" class="form-control client_ville" onchange="send_postalcode(this.value)">
                  <?php $list = $bdd->query('SELECT DISTINCT * FROM ville ORDER BY ville_nom ASC');
                  while ($data = $list->fetch()) { ?>
                      <option value="<?php echo $data['ville_nom']; ?>"> <?php echo $data['ville_nom']; ?></option>
                  <?php } $list->closeCursor(); ?>
                </select>
              </datalist>
            </div>
 
<script>
     function send_posdtalcode(city_ref){
          alert(city_ref);
      }
</script>