$.ajax({
type: "POST",
url: "add_secondary_interest.php",
data: "interest=ok",
cache: false,
success: function(html){
$('#interest_table tr:last').after(html);
}
});
The ajax response is this
<select name="test[]">
<option value='7'>abc</option>
<option value='1'>xyz</option>
</select>
But when i post the form, this dynamic select box is not posted.
The short answer is that, when jQuery adds the element, it gets bound to the table element rather than the form element. To fix this, make the DOM relative to the form. For example: