Hi all
I have been working on on an AJAX chat application using php, mysql. It's almost done now; the only issue I am facing is that the textbox where the user types his message to post a reply keeps losing its focus during the async ajax calls.
What is happening here is that I have two divs which are being constantly updated with two different AJAX calls. One is for the online users and another one is for the messages list. It's working perfectly. To give the users a real time view I have to fire the ajax calls very frequently, like every 2 secs or something near to that. The ajax functions are working perfectly; only while the ajax call is in progress and the user is typing a message does it lose focus, and the user has to click somewhere else in the browser and come back to the textbox to type again.
Any sort of help is appreciated. Best regards.