0
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.

Ravi Teja Kumar Isetty
  • 1,529
  • 3
  • 19
  • 37
weirdo
  • 336
  • 1
  • 9

0 Answers0