forked from EdTrench/ASPWebAPIExample
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmonitor.html
More file actions
35 lines (32 loc) · 1.1 KB
/
monitor.html
File metadata and controls
35 lines (32 loc) · 1.1 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
<!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>
<title></title>
</head>
<body>
<div id = "target" class="display-label">
<ul></ul>
</div>
</body>
<script src="Scripts/jquery-1.6.4.min.js" type="text/javascript"></script>
<script src="Scripts/jquery.signalR-0.5.1.min.js" type="text/javascript"></script>
<script src="signalr/hubs" type="text/javascript"></script>
<link href="Content/Site.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
$(function () {
var notificationHub = $.connection.notificationHub;
notificationHub.sendMessage = function (content) {
$("#target")
.find('ul')
.append($("<li></li>").html(content));
};
$.connection.hub.start(function () {
notificationHub.activate(function (response) {
$("#target")
.find('ul')
.append($("<li></li>").html(response));
});
});
});
</script>
</html>