diff --git a/SRC/public/js/ListeOeuvre.js b/SRC/public/js/ListeOeuvre.js index 6f8006b..e402692 100755 --- a/SRC/public/js/ListeOeuvre.js +++ b/SRC/public/js/ListeOeuvre.js @@ -79,20 +79,32 @@ $('#search_button, #previous, #next').click(function(event) { } $('#oeuvreRes').empty(); - dataSend = { - _token : $('#_tokenRes').val(), - auteur: $('#auteur').val(), - designation: $('#designation').val(), - matiere: $('#matiere').val(), - domaine: $('#domaine').val(), - technique: $('#technique').val(), - debut: $('#debut').val(), - fin: $('#fin').val() - }; - $.post(url, - dataSend, - function( data ) { - if (data.length == 0 ) + dataSend = "_token = $('#_tokenRes').val()," + +"auteur = ('#auteur').val()," + +"designation = $('#designation').val()," + +"matiere = $('#matiere').val()," + +"domaine = $('#domaine').val()," + +"technique = $('#technique').val()," + +"debut = $('#debut').val()," + +"fin = $('#fin').val()"; + + var r = new XMLHttpRequest(); + r.open("POST", url, true); + r.onreadystatechange = function () { + if (r.readyState != 4 || r.status != 200) + { + $("#oeuvreRes").append('