]> git.scottworley.com Git - reliable-chat/blobdiff - webclient/rc.js
Start poking at the web client.
[reliable-chat] / webclient / rc.js
diff --git a/webclient/rc.js b/webclient/rc.js
new file mode 100644 (file)
index 0000000..13190c5
--- /dev/null
@@ -0,0 +1,11 @@
+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;
+       }
+}