Max (or maybe some else) says:

[nothing yet]

Type and send to Max:

(using channel: "jmPubNub1", subscribekey: "demo", publishkey: "demo")

"GLobal" Code

<script src="http://cdn.pubnub.com/pubnub-3.7.1.min.js"></script>
					
var pubnub = PUBNUB.init({
	publish_key   : 'demo',
	subscribe_key : 'demo'
    });
					

JavaScript Code To Publish

function sendToMax(form) {
	pubnub.publish({
		channel : 'jmPubNub1',
		message : {"theWebSiteSays" : jQuery("#thisWillGoToMax").val()}
	});
	jQuery("#thisWillGoToMax").val('');
}
					
					

JavaScript Code To Subscribe

pubnub.subscribe({
	channel  : "jmPubNub1",      // CONNECT TO THIS CHANNEL.
	error    : function() {        // LOST CONNECTION (auto reconnects)
		alert("Connection Lost. Will auto-reconnect when Online.")
	},
	callback : function(fromMax) { // RECEIVED A MESSAGE.
		if(fromMax.value != undefined) {
			jQuery("#jmPubNubDisplay").text(fromMax.value);
		}
	}
})