for (var i=0; i<id.length; ++i) {
$.ajax({
url: 'some/url/to/post',
data: {
id_to_post: id,
},
type: 'post',
dataType: 'html',
success: function(html) {
$("#" + id[i]).html("<br>" + html + "<br>");
}
});
}
after ajax success, the HTML response never write to the div because when I alert id[i]
it become "#undefine"
.
Anyone can help on this.