Skip to content

Instantly share code, notes, and snippets.

@christopherhouse
Last active December 31, 2015 15:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christopherhouse/8006888 to your computer and use it in GitHub Desktop.
Save christopherhouse/8006888 to your computer and use it in GitHub Desktop.
$(document).ready(function() {
$("#ajaxLink").click(function (event) {
event.preventDefault();
$.get("/Home/GetData").error(function(jqxhr) {
var errorObject = JSON.parse(jqxhr.responseText);
$("#errorMessage").text(errorObject.message);
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment