diff -r 25323b275a44 -r fdf35f8d7ff8 client/scripts/client.js --- a/client/scripts/client.js Tue Sep 27 02:48:06 2011 +0200 +++ b/client/scripts/client.js Wed Sep 28 03:14:37 2011 +0200 @@ -1,6 +1,29 @@ +var view_left = "

Machine

Be yourself within Machine.

"; + function command() { - var com = document.getElementById("com").value; - var view = document.getElementById("view-area"); - view.value = "hi"; -} \ No newline at end of file + var com = document.getElementById("com"); + view_left = "

Machine

" + com.value + "

"; + $("view-left").replaceWith(view_left); + com.value = ""; +} + +$(document).ready +( + function() + { + $("view-left").replaceWith(view_left); + } +); + +$(document).keypress +( + function(event) + { + if (event.which == 13) + { + event.preventDefault(); + command(); + } + } +); \ No newline at end of file