-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchat.html
More file actions
59 lines (51 loc) · 1.66 KB
/
Copy pathchat.html
File metadata and controls
59 lines (51 loc) · 1.66 KB
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
53
54
55
56
57
58
59
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Anon-Chat</title>
<style type="text/css">
* { font-family: Helvetica; margin:0px;}
body { background-color: #3c3c3c; text-align:center; }
#form { width: 400px; float;right; border: 0px dashed red; margin-left:auto; margin-right:auto; margin-top: 15%}
#output { font-size:10pt; text-align:left; border: 1 px solid black; background-color: #cccccc; width: 400px; height: 300px;overflow:auto;}
#input { clear: both; width: 400px; padding:0px }
input { padding: 0px; margin: 0px; }
#txt { width: 354px; height: 25px; border: 1px solid black; background-color: #cccccc;}
#btn { width: 40px; border: 1px solid black; background-color: #cccccc; height: 25px; }
</style>
<script src="http://www.robsayers.com/jquery.js" type="text/javascript"></script>
<script type="text/javascript">
$().ready(function(){
var key="";
$.get('/newuser',function(data){ key=data; go(key) });
$('#btn').click(function(){ sendmsg(key) });
$('#msgform').submit(function(){ sendmsg(key); return false; });
})
function go(k){
$('#output').load('/go?key='+k)
setTimeout("go('"+k+"')",1000)
}
function sendmsg(key){
var msg=$('#txt').val();
$.get('/newmsg?key='+key+'&txt='+msg)
$('#txt').val('');
}
</script>
</head>
<body>
<div id="container">
<div id="form">
<div id="output">
</div>
<div id="input">
<form method="get" id="msgform">
<span>
<input id="txt" />
<input id="btn" type="button" value="send" />
</span>
</form>
</div>
</div>
</div>
</body>
</html>