"Okay"-Tour
Processing...
'); //Extract action URL from commentform var formurl=commentform.attr('action'); //Post Form with data $.ajax({ type: 'post', url: formurl, data: formdata, error: function(XMLHttpRequest, textStatus, errorThrown) { statusdiv.html('You might have left one of the fields blank, or be posting too quickly
'); }, success: function(data, textStatus){ if(data == "success" || textStatus == "success"){ statusdiv.html('Thanks for your comment. We appreciate your response.
'); }else{ statusdiv.html('Please wait a while before posting your next comment
'); commentform.find('textarea[name=comment]').val(''); } } }); return false; }); });