hi! i have a list of names with "delete" button, every row is a form and clicking on delete the list should be updated in real time but don't works because in this plugin i can set only one id (infact it runs when in the list there's only one name)
this is the javascript function:
$(document).ready(function() {
var options = {
target: '#risposta',
resetForm: true,
success: function(showResponse) {
$("#lista_categorie").load("categorie.php").show('fast');
$('#risposta').fadeIn(2000),setTimeout(function({$('#risposta').fadeOut(1000);},5000);}};
$('#elimina_categoria').ajaxForm(options);
});
the html form is build with php:
<form action="categorie_elimina.php?id=$row['id']" method="post" id="elimina_categoria">
<p>$row['nome']
<input type="submit" id="submit_pro" value="elimina" class="elimina"></p>
</form>
i should create a different id for every form (using the id of the row for example) but i should tell to js function that every form must follow that function in this line:
$('#elimina_categoria').ajaxForm(options);
i also used this code:
$('[id|=elimina_categoria]').ajaxForm(options);
but this only works at first click, clicking the second time it opens the php script.. hope you can help me, sorry for bad english