Transaction JSON, je n'arrive pas à modifier plus d'une cellule de ma table
Bonjour j'essaye de modifier des cellule de mon table sauf que j'arrive a en changer une mais pas le reste
Code:
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
| $(document).ready(function(){
var id = "";
var community = "";
//Load Community list
$.ajax({
dataType: "json",
url: "post.php",
data: "refresh=1",
success: function(json){
$.each(json, function(index, value){
$('#communauty_list_id').append("<tr><td><a id ='disable' href='post.php?disable="+json[index].id_community+"'>disable</a></td></tr>");
if(json[index].community_actif == 0){
$("#disable").html("enable");
}
});
$('#communauty_list_id a').click(function(){
id = $(this).parent().attr('id'); //On recupere l'id de la communauté
community = $(this).find('td').val();
myPopUp("#"+id,"#popupContact","#popupContactClose");
});
}
});
}); |
et le resultat
Code:
1 2 3
| www.sfr.fr | 0 | remove | enable
http://www.orange.com/ | 0 | remove | disable
http://www.yahoo.com/ | 0 | remove | disable |