i have some code like this
Code:
$(".commentsubmit").click(function() {
if ($(this).prev()[0].value != "") {
var thiscomment = $(this).parents(".quick_comment_form");
var cbox = thiscomment.next().next();
var mbox = thiscomment.find(".commentmessage");
var tbox = thiscomment.next();
cbox.html("<img src=\"http://url\" /> Submitting");
$.post("http://url",
{message:mbox[0].value,target_id:tbox[0].value},
function(data){
cbox.html("");
cbox.after(data);
mbox.attr("value","");
},"html"
);
return false;
}
});
the problem is that the data sometimes is submitted more than one time.
what to do about this
__________________
Please login or register to view this content. Registration is FREE
Check out the Facebook Clone build with Jcow SNS at Please login or register to view this content. Registration is FREE , it is free and it always will be
|