Last active
December 19, 2015 13:39
-
-
Save rcurlette/5963773 to your computer and use it in GitHub Desktop.
Signalr4Tridion test page for confirming the Signalr Server, and especially the URL of the server, are working correct.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="Scripts/jquery-1.6.4.js" type="text/javascript"></script> | |
<script src="Scripts/jquery.signalR-1.1.2.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
$(function () { | |
var connection = $.connection('/channel'); | |
connection.received(function (data) { | |
$('#messages').prepend('<li>' + data + '</li>'); | |
}); | |
connection.start().done(function () { | |
$("#broadcast").click(function () { | |
connection.send($('#msg').val()); | |
}); | |
}); | |
}); | |
</script> | |
</head> | |
<!-- Sample Code from https://github.com/SignalR/SignalR/wiki/QuickStart-Persistent-Connections --> | |
<body> | |
<form> | |
<input type="text" id="msg" /> | |
<input type="button" id="broadcast" value="broadcast" /> | |
<ul id="messages"> | |
</ul> | |
</form> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment