« Earlier 1 items total Later »

On this page: 

Debugging RJS

<script>
Ajax.Responders.register({
  // log the beginning of the requests
  onCreate: function(request, transport) {
    new Insertion.Bottom('debug', '<p><strong>[' + new Date().toString() + '] accessing ' + request.url + '</strong></p>')
  },

  // log the completion of the requests
  onComplete: function(request, transport) {
    new Insertion.Bottom('debug', 
    '<p><strong>http status: ' + transport.status + '</strong></p>' +
    '&lt;pre>' + transport.responseText.escapeHTML() + '&lt;/pre>')
  }
});
</script>


Remember to add <div id="debug"></div> to your page

« Earlier 1 items total Later »