My favorites | Sign in
Project Logo
                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>A Client-Server</title>


<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>

</head>

<body>

<h1>Client-URL</h1>
<div id="clientId"></div>

<h2>Log</h2>
<div id="log"></div>

<h2>Test-Form</h2>
<form target="_blank" method="Get" id="testForm">
Message: <input type="text" name="message" value="Hello World">
<input type="submit" value="Submit (Will open a new window) and display message here">
</form>

<p><a href="chat.html">Demo Chat-Client</a></p>

<p><a href="http://joose-js.blogspot.com" target="_top">More Info</a></p>

<script type="text/javascript" src="http://universal-comet.appspot.com/static/client-server-mini.js"></script>
<script type="text/javascript">
var server = new Addressable.Server({ useGears: true });

server.onmessage = function (message) {
log(message)
}

server.connect(function (id, url) {
log("Connected. Messages will appear here.")
$("#clientId").html("Client-Url: "+url)
$("#testForm").attr("action", url)
})

function log(msg) {
var log = $("#log");
log.html(""+msg + "<br />" + log.html())
}

</script>

</body>
</html>
Show details Hide details

Change log

r382 by malte.ubl on Dec 31, 2008   Diff
Add link to chat
Go to: 
Sign in to write a code review

Older revisions

r375 by malte.ubl on Dec 29, 2008   Diff
Enable JS minification
r374 by malte.ubl on Dec 29, 2008   Diff
Implement one-socket-per-browser for
Gears implementation.
r373 by malte.ubl on Dec 27, 2008   Diff
Switch standard implementation to only
maintain one comet connection per
domain.

Gears implementation has not yet been
...
All revisions of this file

File info

Size: 1391 bytes, 52 lines

File properties

svn:mime-type
text/html
Hosted by Google Code