I'd like to send series["id"+i] to write.php. (This code is in another ajax request.) Any idea?
series = new Object();
$(xml_node).find("Series").each(function (i) {
series["id" + i] = $(this).find("seriesid").text();
series["name" + i] = $(this).find("SeriesName").text();
series["banner" + i] = $(this).find("banner").text();
table += '<tr<td>' + series["banner" + i] + '</td>' + '<td>' + series["name" + i] +
'</td>' + '<td>' + '<button>Add show</button>' + '</td>' + '</tr>';
});
$('button').click(function addseries() {
$.ajax({
type: "POST",
url: 'write.php',
data: series["id" + i],
success: function (data) {
console.log(data);
}
});
});