Permalink
Browse files

fixed chat boxes only sending once per refresh

  • Loading branch information...
1 parent 8a737e3 commit 78290b6dbf10a55026c68d49105bf986c690415f @benjamw committed Jul 29, 2010
Showing with 4 additions and 4 deletions.
  1. +2 −2 scripts/game.js
  2. +2 −2 scripts/index.js
View
@@ -143,7 +143,7 @@ $(document).ready( function( ) {
// chat box functions
$('#chatbox form').submit( function( ) {
- if ('' == $.trim($('#chatbox input').val( ))) {
+ if ('' == $.trim($('#chatbox input#chat').val( ))) {
return false;
}
@@ -167,7 +167,7 @@ $(document).ready( function( ) {
'<dd'+(('1' == reply.private) ? ' class="private"' : '')+'>'+reply.message+'</dd>';
$('#chats').prepend(entry);
- $('#chatbox input').val('');
+ $('#chatbox input#chat').val('');
}
}
});
View
@@ -21,7 +21,7 @@ $(document).ready( function( ) {
// chat box functions
$('#chatbox form').submit( function( ) {
- if ('' == $.trim($('#chatbox input').val( ))) {
+ if ('' == $.trim($('#chatbox input#chat').val( ))) {
return false;
}
@@ -44,7 +44,7 @@ $(document).ready( function( ) {
var entry = '<dt>'+reply.username+'</dt>'+
'<dd>'+reply.message+'</dd>';
$('#chats').prepend(entry);
- $('#chatbox input').val('');
+ $('#chatbox input#chat').val('');
}
}
});

0 comments on commit 78290b6

Please sign in to comment.