Browse Source

Updated htmls to use conneciton.js

master
Joshua Moerman 12 years ago
parent
commit
b1bf2f8088
  1. 3
      index.html
  2. 4
      observer.html

3
index.html

@ -1,6 +1,7 @@
<!DOCTYPE html>
<meta charset="utf-8" />
<title>WebSocket Test</title>
<script type="text/javascript" src="connection.js"></script>
<script language="javascript" type="text/javascript">
var myName = Math.random().toString(36).substring(7);
var websocket;
@ -16,7 +17,7 @@
testWebSocket();
}
function testWebSocket() {
websocket = new WebSocket("ws://127.0.0.1:7681");
websocket = new WebSocket(wsURI);
websocket.onopen = function (evt) { onOpen(evt) };
websocket.onclose = function (evt) { onClose(evt) };
websocket.onmessage = function (evt) { onMessage(evt) };

4
observer.html

@ -25,6 +25,7 @@
background-color: #0af;
}
</style>
<script type="text/javascript" src="connection.js"></script>
<script language="javascript" type="text/javascript">
var websocket;
var the_screen;
@ -34,7 +35,7 @@
testWebSocket();
}
function testWebSocket() {
websocket = new WebSocket("ws://127.0.0.1:7681", "observer");
websocket = new WebSocket(wsURI, "observer");
websocket.onopen = function (evt) { onOpen(evt) };
websocket.onclose = function (evt) { onClose(evt) };
websocket.onmessage = function (evt) { onMessage(evt) };
@ -77,7 +78,6 @@
window.addEventListener("load", init, false);
</script>
<p>Response of server: <span id="people"></span>
<p>Status: <span id="status">unknown</span>
<div id="screen">