I'm making a script and found an error when I want call again the ajax function by links generated by this.
This is the html
<tr>
<td>1</td>
<td>2012-04-11 00:00:00</td>
<td>2012-04-23 00:00:00</td>
<td></td>
<td></td>
<td></td>
<td>
<div id="op_33"><a id='33' name="33" class="elimina" >delete</a></div>
</td>
</tr>
and several similar rows whit diferents id.
This is my ajax function.
jQuery('.elimina').click( function(event) {
if (confirm("Pulse aceptar si desea eliminar dicha linea"))
{
event.preventDefault()
var id = $(this).attr('name');
jQuery.ajax({
type: "POST",
dataType: 'html',
url: 'process/functions_seguimientos.inc.php',
data: 'action='+$(this).attr('name'),
success: function(data) {
jQuery('#lista_genera').html(data);
}
});
}
});
The script php delete the unegisters the element from sql database by id and generate the list with the same options for delete.
The first time ajax function no have any problem, but when the resulting list I try to click on the link for delete another record, that link no longer works.
Thanks in advance for your prompt assistance
Erick