Several weeks ago we added an AJAX chat page to HostJ2ME.com. The page enables users of the HostJ2ME.com website to chat with others website users and with users of the OSM mobile client. The chat UI implementation is completely HTML and JavaScript, and uses AJAX to check for new messages in the server database. Use view-source to see how the HTML and AJAX code is implemented. As with most of the software we produce, the code is open-source and can be copied, changed, and redistributed without charge. If you need to see the server implementation, please send us an email.
To check out the chat page, visit HostJ2ME.com and log into your account.