summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorsostler <sbostler@gmail.com>2010-01-09 16:47:35 -0500
committersostler <sbostler@gmail.com>2010-01-09 16:47:35 -0500
commit953b0041bf74bb410902b664458b21159ff6a8c7 (patch)
treed2d6f159fbc92297a965ba3252c7bf496f142351 /static
parent2dd09cf9dc957d3660744d49d3f8e905d0ce927a (diff)
Add message to page before sending to server
Diffstat (limited to 'static')
-rwxr-xr-xstatic/pichat.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/static/pichat.js b/static/pichat.js
index 3267b49..4384ed0 100755
--- a/static/pichat.js
+++ b/static/pichat.js
@@ -62,6 +62,8 @@ function submitMessage() {
PostedMessages.push(content);
$('#msgInput').val('');
+ updateUI([{ 'nick': Nick, 'content': content}], null);
+
var onSuccess = function(json) {};
var onError = function(resp, textStatus, errorThrown) {
$('#msgInput, #msgSubmit').removeAttr('disabled');
@@ -77,9 +79,7 @@ function submitMessage() {
dataType: 'json',
success: onSuccess,
error: onError
- });
-
- updateUI([{ 'nick': Nick, 'content': content}], null);
+ });
}
function ifEnter(fn) {