--- /dev/null
+html, body, #outer-table, #history { width: 99.9%; height: 100%; margin: 0; padding: 0 }
+#status { background-color: #eef }
+#say { width: 100% }
+#history { vertical-align: bottom }
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>Reliable Chat</title>
+ <link rel="stylesheet" title="Default style" href="rc.css" type="text/css"/>
+ <script type="text/javascript" src="rc.js"></script>
+</head>
+
+<body>
+ <table id="outer-table">
+ <tr><td id="history"></td></tr>
+ <tr><td id="status"> </td></tr>
+ <tr><td><form name="input"><input id="say" onkeydown="return rckeydown(event)"></input></form></td></tr>
+ </table>
+</body>
+</html>
--- /dev/null
+function rckeydown(event) {
+ if (event.keyCode == 13) {
+ var d = document.createElement("div");
+ d.appendChild(document.createTextNode(document.input.say.value));
+ var h = document.getElementById("history");
+ h.appendChild(d);
+ window.scrollTo(0, document.body.scrollHeight);
+ document.input.say.value = "";
+ return false;
+ }
+}