$.ajax({ url: "www.site.com/page", success: function(data){ $('#data').text(data); }, error: function(){ alert("There was an error."); } });