mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-09-25 12:22:39 +02:00
corrected the json string in sendChat()
This commit is contained in:
parent
723e7da8d3
commit
61c6f4a086
16
web/chat.js
16
web/chat.js
@ -5,14 +5,14 @@ function sendChat(message) {
|
|||||||
url: "http://jsonip.appspot.com/?callback=?",
|
url: "http://jsonip.appspot.com/?callback=?",
|
||||||
dataType: "jsonp",
|
dataType: "jsonp",
|
||||||
success: function(getip) {
|
success: function(getip) {
|
||||||
var data = { name: getip.ip, message: message };
|
var data = '{"name":"'+getip.ip+'","message":"'+message+'"}';
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: '/up/sendmessage',
|
url: 'http://prosrv.info:8123/up/sendmessage',
|
||||||
data: data,
|
data: data,
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
//handle response
|
//handle response
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -210,7 +210,7 @@ DynMap.prototype = {
|
|||||||
.attr({
|
.attr({
|
||||||
id: 'chatinput',
|
id: 'chatinput',
|
||||||
type: 'text',
|
type: 'text',
|
||||||
value: 'not working yet'
|
value: ''
|
||||||
})
|
})
|
||||||
.keydown(function(event) {
|
.keydown(function(event) {
|
||||||
if (event.keyCode == '13') {
|
if (event.keyCode == '13') {
|
||||||
|
Loading…
Reference in New Issue
Block a user