HTML Chat : Is appending text the best/only way?

All the in-browser chat rooms I have seen so far append messages into the html.

Questions: Is this the proper way to do browser based chat rooms? Will I run into any problems if I implement a browser based chat like this?

Answers


Yes, this is how to do chat rooms in html. There is no practical way to display more text without changing the html in some way.

The only problem you might want to watch out for is auto scrolling. The browser will not continue to scroll down to display the next new message (assuming you're appending at the bottom) unless you code auto scrolling into the javascript, so you should probably do that.


It should work cross browser, but you might have problems with IE and document.getElementById();


Need Your Help

Define a new mathematical function in TCL using Tcl_CreateMathFunc

math tcl

I use TCL 8.4 and for that version I need to add a new mathematical function into TCL interpreter by using TCL library function, particularly Tcl_CreateMathFunc. But I could not find a single examp...

Box2d Degrees are flipped

ios box2d

I have a B2Body which I am setting it's velocity. I am using Box2d And noticed that the degrees are flipped. In other words, I essentially have a backwards protractor (one that starts at zero from ...