jquery.form: how to set more than one form in one page?

myst

New Member
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:\[code\]$(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); }); \[/code\]the html form is build with php:\[code\]<form action="categorie_elimina.php?id=$row['id']" method="post" id="elimina_categoria"><p>$row['nome'] <input type="submit" id="submit_pro" value="http://stackoverflow.com/questions/2116895/elimina" class="elimina"></p></form>\[/code\]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:\[code\]$('#elimina_categoria').ajaxForm(options); \[/code\]i also used this code:\[code\]$('[id|=elimina_categoria]').ajaxForm(options);\[/code\]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
 
Back
Top