X-Git-Url: http://git.scottworley.com/reliable-chat/blobdiff_plain/1c4255180393ac0b6dbea555855aa8c94c2edcdb..827f21bbcf5f799fcb3a06695b9f34a1fe23b108:/webclient/rc.js diff --git a/webclient/rc.js b/webclient/rc.js new file mode 100644 index 0000000..13190c5 --- /dev/null +++ b/webclient/rc.js @@ -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; + } +}