Created
March 14, 2010 18:53
-
-
Save juggy/332155 to your computer and use it in GitHub Desktop.
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
<!-- It uses prototype & the bolide.js found in the ruby plugin or at live.bolideapp.com --> | |
<script src="/javascripts/prototype.js?1267672430" type="text/javascript"></script> | |
<script src="http://live.bolideapp.com/js/bolide.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
// With session ID and Token | |
bolide = new Bolide.Client("bolide", "b79c55c143df93241981c49aa97329f6", "cdcdaeb0-11c6-012d-0145-404077aa86f5", { | |
onSuccess: function(response){ | |
print("Success", response); | |
}, | |
onFailure: function(response){ | |
print("Failure", response); | |
} | |
}); | |
//update our view | |
function print(ev, response){ | |
if(response == "") response = "No value"; | |
responseEl = new Element('div').update(response); | |
timeEl = new Element('div', {'class':'time small'}).update(ev + " at " + new Date().toUTCString()); | |
commEl = $('communication'); | |
commEl.insert({top:timeEl}); | |
commEl.insert({top:responseEl}); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment