Okay, so without boring you with all the wacky details and so forth I'll just cut to the chase:
I have a chat system that's been running for about 7 years now. It's written in PHP (of course) with a mySQL backend. It's what I call 'webchat' in that it's not java based, no plugins or d/l's are required and so forth. I have always offered a "frames" version and "no frames" version that the user can select prior to entering a room.
No Frames Mode works like this - If the 'send/receive' button is clicked it will post their message if they entered one and also display any new message from the other chatters. If the user didn't enter a message, then the 'send/receive' button simply shows any new messages from other users.
Frames Mode works like this - There is a bottom frame with the chat textarea box and the send button. The upper frame is the 'output' area where with a 'receive' button. It works almost the same as No Frames Mode except that you use the 'receive' button in the upper frame to display new messages and only use the 'send' button in the lower frame if you want to send a message.
Now, here is the new version I want to introduce - We'll call it "Streaming Mode". This mode would be just like Frames Mode except that the 'receive' button wouldn't be there. Instead, the browser (or that output window) would stay alive somehow and it would automatically display any new messages received in the database without the user having to do anything.
I've played around with ideas with AJAX and while loops with sleep but I can't quite figure out how to pull it off.
I'm really hoping someone on here will have some ideas or examples.
Thanks for looking!