I found this great video by Kosso where put together a sample/demo chat application which plays nice with web browsers & the iPhone as its written entirely in Javascript.  The example uses nowJs, nodeJs & Titanium