<!doctype html>
<html>

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
	<title>Appointly</title>

	<!-- Respoke client library -->
	<script src="https://cdn.respoke.io/respoke.min.js"></script>

	<!-- jQuery, for this example -->
	<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>

	<!-- Some simple styles to make things perty -->
	<link rel="stylesheet" type="text/css" href="style.css">
	</style>

	<link href="www/css/style.css" rel="stylesheet">

</head>

<body>

	<div>
		<a id="doLogin">
			<img src="www/img/Web-with-button.png" alt="picture of web version">
		</a>
	</div>

	<script type="text/javascript">
		// App ID value from the dev portal. You can play
		// around with the supplied ID but should replace it
		// with your own.
		var appid = "552d7395-f507-4f15-8f2d-f9ffd8f75ee7";
		// The ID that other users will identify you by (your username)
		var endpointId;
		// Create the client object using the App ID
		var t = true;
		var client = respoke.createClient({
			appId: appid,
			developmentMode: true
		});
		// "connect" event fired after successful connection to Respoke
		client.listen('connect', function() {
			console.log("Connected!");
			var remote = "B";
			// Make an endpoint for that recipient
			var endpoint = client.getEndpoint({
				id: remote
			});
			// Grab the text to send
			// Send it
			endpoint.sendMessage({
				message : 'C'
			});

			console.log("Appointment Sent!");

		});
		// Listen for incoming messages
		client.listen('message', function(evt) {
		});
		// Connect to Respoke when the user clicks "connect"
		$("#doLogin").click(function() {
			if (t){
				endpointId ='A';
				t = false;
				client.connect({
					endpointId: endpointId // your username is the endpoint

				})
			};
		});
		// Send message

	</script>
</body>

</html>

Backup client page for future usage with Respoke
Backup client page for future usage with Respoke
