26 lines
760 B
Text
26 lines
760 B
Text
<html>
|
|
<head>
|
|
<script src='javascripts/swfobject.js'></script>
|
|
<script src='javascripts/FABridge.js'></script>
|
|
<script src='javascripts/web_socket.js'></script>
|
|
<script>
|
|
$(document).ready(function(){
|
|
function debug(str){ $("#debug").append("<p>" + str); };
|
|
|
|
ws = new WebSocket("ws://localhost:8080/");
|
|
ws.onmessage = function(evt) { $(".msg").prepend("<p>"+evt.data+"</p>"); };
|
|
ws.onclose = function() { debug("socket closed"); };
|
|
ws.onopen = function() {
|
|
debug("connected...");
|
|
ws.send("hello server");
|
|
ws.send("hello again");
|
|
};
|
|
});
|
|
</script>
|
|
</head>
|
|
<body>
|
|
boner
|
|
<div id="debug"></div>
|
|
<div class="msg"></div>
|
|
</body>
|
|
</html>
|