I want to cancel the post update in some circunstances without the need to reload the entire page.
I’ve tried:
// publish is the id of the Update button.
$('#publish').click(function(){
return false;
});
// post is the id of the corresponding form.
$('#post').submit(function(){
return false;
});
In both codes the form it’s not submitted but the Update button remain disabled and the ajax loader gif is showed.
How I can do this? Thanks in advance.
Finally, with the help of those who answered my question (specially to stealthyninja), I managed to bring working what I asked.
@karevn: This solution doesn’t break the autosave in current WordPress version (tested up to 3.2.1).