Bonjour
j'ai un script PHP qui appelle une fonction(js) qui ce situe en bas de la page
mais je ne comprend pas comment il appelle cette fonction
pouvez vous m'aider à comprend
d'avance merci pour votre aide
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 <div id = "Menu" class="tab"> <div id="wrapper"> <form action='' method='post'> <p><label>agence:</label> <select name='catIDagence' id='catIDagence'> <div id = "Menu" class="tab"> <option value=''>Select</option> <?php $stmt = $conn->query('SELECT catIDagence,nomagence FROM agence ORDER BY nomagence'); while($row = $stmt->fetch(PDO::FETCH_OBJ)) { echo "<option value='$row->catIDagence'>$row->nomagence</option>"; } ?> </div> </select> </p> <p><label>Sites:</label> <select name='IDsites' id='IDsites'></select> </form> </div>
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 <script type="text/javascript"> $(function() { $("#catIDagence").bind("change", function() { $.ajax({ type: "GET", url: "change.php", data: "catIDagence="+$("#catIDagence").val(), success: function(html) { $("#IDsites").html(html); } }); }); }); </script>
Partager