This can be done with a little client side javascript,asp
and a database.
The first point is what is real-time. With some applications, java ones typicaly, this can be very
close to instantaneous, but the real point is is a
one or two second delay reasonable.
If so here it is.
Page ONE:
<div id="Chat"></div>
<iframe src="PageTWO"></iframe>
<iframe src="about:blank"></iframe>
<form action="Page3" target="iframe2">
<input type="text"><input type="submit">
</form>
That was simple.
Page TWO:
Use this page to get the top 50 records from the
database in datetime order.
loop through these records and create your html output.
Make sure the output is within <div id="getChat">
and </div>
at the bottom of the page use
<script language="javascript">
parent.Chat.innerHTML = document.all.getChat.innerHTML;
window.setTimeout("history.go(0);",1000);
</script>
Page THREE :
Process the insert of the message into the database.
The speed of this method =
the time it takes your server to process the insert
+
the time it takes to generate the output
+
the time of the refresh of frame 1(Page TWO)
+
the time it takes for the client to process the javascript
IF you want me to write a more code specific answer
just reply here.
Hope this helps.
CFK