$('#com_form').submit(function(){
var ele = $(this);
$.post("includes/agenda_com.php",
{
texte : ele.find('textarea').val(),
id : ele.find('#agenda_id').val();
},
function(data){
if(data=='foo')
{
alert("Erreur ! votre commentaire n'a pas pu etre poste.");
}
else
{
ele.prev('#last').append(data);
ele.find(':submit').attr('disabled','disabled');
}
}
);
return false;
});
well i'm using this code to post a text without reloading the page, but the return false; doesn't seem to work since the form actually submit the page to nowhere (cause i didn't put any action="somewhere" in my form code