Hi,
I got several forms listed through a loop at one page such like this: (extract)
if(mysql_num_rows($r)>0):
while($row = mysql_fetch_assoc($r)): ?>
<form id="myForm" action="save_fb.php" method="post">
Title: <input type="text" name="fb_title" value="<?php echo $row['fb_title']; ?>" /><br>
<a href="javascript:;" class="save_fb" id="<?php echo $row['fb_id']; ?>"></a>
</form>
in my ajax request i do something like:
$.ajax({
type: "POST",
data: $("input:text[name=fb_titel]").val()+$(this).attr("id"),
url: "save_fb.php",
success: function(msg)
{
$("span#votes_count"+the_id).fadeOut();
$("span#votes_count"+the_id).html(msg);
$("span#votes_count"+the_id).fadeIn();
}
});
});
now I get as an result always first row and not the row where the link was clicked however the $(this) works fine but I do not know how to combine... Anyone know how the data line should look like?
Thanks for any hint =)