Skip to content

Instantly share code, notes, and snippets.

@davidjrice
Created February 8, 2010 03:24
Show Gist options
  • Save davidjrice/297851 to your computer and use it in GitHub Desktop.
Save davidjrice/297851 to your computer and use it in GitHub Desktop.
error: function(XMLHttpRequest, textStatus, errorThrown) {
var response = XMLHttpRequest.responseText;
var start = response.indexOf('(');
var finish = response.indexOf(')');
var json = JSON.parse( response.substring(start+1,finish) );
$status.text(json['error']);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment