Before i begin I believe this is not a dublicate at first.
Here's my problem:
I have a chatroom php script that i use ajaxForm jQuery plugin in order to send new messages without reloading the whole page.
The fact is that posting takes about 1-2 secs with times: e.g
Blocking:6ms
Sending:1ms
Waiting:1.15 sec
Recieving 1ms
$('#myform').ajaxForm(function() {
//clear form after this
$('#myform').clearForm();
});
The form is cleared after te recieving time,meaning it takes about 1.20sec to clear each message i send... and it seems like the chat lags for a bit.
I am trying to figure out a way to clear the form after the Sending part,without callback or something.