diff --git a/web/chat.js b/web/chat.js index 923fe8cf..ac204d3a 100644 --- a/web/chat.js +++ b/web/chat.js @@ -5,14 +5,14 @@ function sendChat(message) { url: "http://jsonip.appspot.com/?callback=?", dataType: "jsonp", success: function(getip) { - var data = { name: getip.ip, message: message }; - $.ajax({ - type: 'POST', - url: '/up/sendmessage', - data: data, - dataType: 'json', - success: function(response) { - //handle response + var data = '{"name":"'+getip.ip+'","message":"'+message+'"}'; + $.ajax({ + type: 'POST', + url: '/up/sendmessage', + data: data, + dataType: 'json', + success: function(response) { + //handle response } }); } diff --git a/web/map.js b/web/map.js index 0ee01f2d..9aca3dd8 100644 --- a/web/map.js +++ b/web/map.js @@ -210,7 +210,7 @@ DynMap.prototype = { .attr({ id: 'chatinput', type: 'text', - value: 'not working yet' + value: '' }) .keydown(function(event) { if (event.keyCode == '13') {