Thank you for your help it works fine :) My script is : <script type="text/javascript"> $(document).ready(function(){ $.getJSON("countries.jsp", function (json) { $.each(json,function(i,obj) { var countries = '<tr><td><strong>Countrie:</strong>' + obj.libelle + '</td><td><a href="#" id="' + obj.paysId + '" class="delete"><img src="delete.png"></a></td></tr>';
$('#addhere').append(countries); }); }); }); </script> As you mentioned I have added a delete image in front of each country to give the user the possibility to delete it from the DB but it does not work . <script type="text/javascript"> $(function() { $(".delete").click(function(){ ... }); </script> I have tried to delete a country that I have added manually (<tr><td><strong>Countrie:</strong>Germany</td><td><a href="#" id="29" class="delete"><img src="delete.png"></a></td></tr>) it works !! Thanks for any help!