79 lines
2.7 KiB
HTML
79 lines
2.7 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<title>Chat Example Using Stomp Over Web Sockets</title>
|
|
<link rel="stylesheet" href="aerogear-chat.css" />
|
|
<script src='http://code.jquery.com/jquery-1.9.1.min.js'></script>
|
|
<script src='stomp.js'></script>
|
|
<script src='aerogear.min.js'></script>
|
|
<script src='aerogear-chat.js'></script>
|
|
<script>
|
|
$(document).ready(function() {
|
|
var supported = ("WebSocket" in window);
|
|
if(!supported) {
|
|
var msg = "Your browser does not support Web Sockets. This example will not work properly.<br>";
|
|
msg += "Please use a Web Browser with Web Sockets support (WebKit or Google Chrome).";
|
|
$("#connect").html(msg);
|
|
}
|
|
});
|
|
</script>
|
|
</head>
|
|
<body>
|
|
|
|
<div id='connect'>
|
|
<form id='connect_form'>
|
|
<dl>
|
|
<dt>
|
|
<label for=connect_url>Server URL</label>
|
|
</dt>
|
|
<dd>
|
|
<input name=url id='connect_url' value='ws://localhost:61614/stomp'>
|
|
</dd>
|
|
<dt>
|
|
<label for=connect_login>Login</label>
|
|
</dt>
|
|
<dd>
|
|
<input id='connect_login' placeholder="User Login" value="guest">
|
|
</dd>
|
|
<dt>
|
|
<label for=connect_passcode>Password</label>
|
|
</dt>
|
|
<dd>
|
|
<input id='connect_passcode' type=password placeholder="User Password" value="guest">
|
|
</dd>
|
|
<dt>
|
|
<label for=destination>Destination</label>
|
|
</dt>
|
|
<dd>
|
|
<input id='destination' placeholder="Destination" value="jms.topic.chat">
|
|
</dd>
|
|
<dt> </dt>
|
|
<dd>
|
|
<input type="submit" id='connect_submit' value="Connect">
|
|
</dd>
|
|
</dl>
|
|
</form>
|
|
|
|
<p>Use the form above to connect to the Stomp server and subscribe to the destination.</p>
|
|
<p>Once connected, you can send messages to the destination with the text field at the bottom of this page</p>
|
|
</div>
|
|
<div id="disconnect">
|
|
<form id='disconnect_form'>
|
|
<input type="submit" id='disconnect_submit' value="Disconnect">
|
|
</form>
|
|
</div>
|
|
<div id="unsubscribe">
|
|
<form id='unsubscribe_form'>
|
|
<input type="submit" id='unsubscribe_submit' value="Unsubscribe">
|
|
</form>
|
|
</div>
|
|
<pre id="debug"></pre>
|
|
<div id="messages"></div>
|
|
<form id='send_form'>
|
|
<input id='send_form_input' placeholder="Type your message here" disabled />
|
|
</form>
|
|
</body>
|
|
</html>
|
|
|