production/livesocket-injection.html | 15 +++++++++++++++
1 file changed, 15 insertions(+)
New commits:
commit 0b1f3619cd1e275453efa4392b810330fa7b6a73
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Jan 18 14:16:04 2011 -0500
Add our livesocket-injection demo
diff --git a/production/livesocket-injection.html b/production/livesocket-injection.html
new file mode 100644
index 0000000..ad7333b
--- /dev/null
+++ b/production/livesocket-injection.html
@@ -0,0 +1,15 @@
+<html>
+ <head>
+ <script
src="http://code.jquery.com/jquery-latest.min.js"></scrip...
+ </head>
+ <body>
+ <a href="#" onclick="moksha.send_message('helloworld',
{'msg': 'Hi there!'});">Send a message</a>
+ <ul id="data"/>
+ </body>
+ <script>
+ function consume_message(json) {
+ $('<li/>').text(json.msg).appendTo('#data')
+ }
+ </script>
+ <script type="text/javascript"
src="http://localhost:8080/livesocket?topic=helloworld&callback=consume_message"></script>
+</html>