This commit is contained in:
FrozenCow 2011-02-19 16:31:36 +01:00
commit 77539522f0
2 changed files with 9 additions and 9 deletions

View File

@ -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
}
});
}

View File

@ -210,7 +210,7 @@ DynMap.prototype = {
.attr({
id: 'chatinput',
type: 'text',
value: 'not working yet'
value: ''
})
.keydown(function(event) {
if (event.keyCode == '13') {