Skip to content

Instantly share code, notes, and snippets.

@juggy
Created March 14, 2010 18:53
Show Gist options
  • Save juggy/332155 to your computer and use it in GitHub Desktop.
Save juggy/332155 to your computer and use it in GitHub Desktop.
<!-- 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