eben noch fix den websocket host und port dynamisch gemacht

This commit is contained in:
Lucas Pleß 2012-02-26 01:52:24 +01:00
parent 47ffb7c1f6
commit ffc7352e4d
1 changed files with 1 additions and 2 deletions

View File

@ -21,8 +21,7 @@
$(document).ready(
function() {
var Socket = "MozWebSocket" in window ? MozWebSocket : WebSocket;
ws = new MozWebSocket("ws://localhost:8080/bunti_server/bunti");
//ws = new MozWebSocket("ws://localhost:8080/grizzly-websockets-chat/chat");
ws = new Socket("ws://" + window.location.hostname + ":" + window.location.port + "/bunti_server/bunti");
ws.onmessage = function (message) {
//$("#messages").append("<p>" + message.data + "</p>");