diff --git a/SRC/public/js/ListeOeuvre.js b/SRC/public/js/ListeOeuvre.js index 8e91d77..ecfc365 100755 --- a/SRC/public/js/ListeOeuvre.js +++ b/SRC/public/js/ListeOeuvre.js @@ -5,27 +5,24 @@ $('.listeoeuvre').click(function(event) { $(this).addClass("active"); $('#oeuvrePic').empty(); url = "/showListOeuvres/" + $(this).children('.idListeOeuvre').val(); - $.get(url, function( data ) { + + + var req = new XMLHttpRequest(); + req.onload = function(e) { + var data = req.reponse; if (data.length == 0 ) + $("#oeuvrePic").append("Aucune Oeuvre"); data.forEach( function(el) { $("#oeuvrePic").append('
' +'' +'' +'
'); - }) - }, "json" ) - - .fail(function() { - $("#oeuvrePic").append('
' - +'Oouups! Il y a un problème.

' - +'' - +'
' - ); - }); + req.open('GET', url, true); + req.send(); + + });