Permalink
Browse files

Output more info in test script callbacks

  • Loading branch information...
1 parent 5ba9567 commit 9f4682e62b33193cda77420b8539de07fcd1611c @execjosh committed Jul 11, 2010
Showing with 5 additions and 5 deletions.
  1. +5 −5 test/test.js
View
@@ -22,20 +22,20 @@
}
// Error handler
- function on_error() {
- $('#page').html("<div>OnError</div>");
+ function on_error(xhr, status, error) {
+ $('#page').html(['<div>OnError<br />', xhr.status, ', ', status, ', ', error, '</div>'].join(''));
enableGui(true);
}
// Success handler
- function on_success(data) {
- $('#page').html("<div>OnSuccess<br />" + data + "</div>");
+ function on_success(data, status, xhr) {
+ $('#page').html(['<div>OnSuccess<br />', xhr.status, ', ', status, ' -- ', data, '</div>'].join(''));
enableGui(true);
}
// Complete handler
function on_complete(xhr, status) {
- console.log(['OnComplete -- "',status,'"'].join(''));
+ console.log(['OnComplete -- ', xhr.status, ', "', status, '"'].join(''));
}
var elmIds = [

0 comments on commit 9f4682e

Please sign in to comment.