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
| function choix_liste(fichier, tableParcours, sport, frequence) {
console.log('entre dans choixListe \n fichier : '+fichier+'\n tableParcours : '+tableParcours+'\n sport : '+sport+'\n frequence : '+frequence);
//au click sur le bouton
$('.choixliste').click(function() {
// Valeur par défaut pour les paramètres optionnels
if( typeof(sport) == 'undefined' ){
sport = "";
}
if( typeof(frequence) == 'undefined' ){
frequence = "";
}
$.ajax({
type : "GET",
url: fichier,
dataType: "json",
data : {tableParcours : tableParcours, sport : sport, frequence : frequence},
success: function (data) {
$('#liste').html( data, tableParcours, sport, frequence );
}
//console.log(html( data, tableParcours, sport, frequence ));
});
});
} |
Partager