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,559
  • 4
  • 21
  • 39
weirdo
  • 334
  • 1
  • 10

0 Answers0