Skip to content

Instantly share code, notes, and snippets.

@ldaniel
Created February 18, 2012 16:23
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 ldaniel/1860036 to your computer and use it in GitHub Desktop.
Save ldaniel/1860036 to your computer and use it in GitHub Desktop.
Load page response content
<!DOCTYPE html>
<html>
<head>
<title>Load</title>
<script type="text/javascript" src="scripts/jquery-1.7.1.min.js"></script>
</head>
<body>
<b>Response:</b>
<div id="success"></div>
<br />
<b>Error:</b>
<div id="error"></div>
<script type="text/javascript">
$("#success").load("https://api.twitter.com/1/statuses/user_timeline.json?include_entities=true&include_rts=true&screen_name=twitterapi&count=2", function (response, status, xhr) {
if (status == "error") {
$("#error").html(xhr.status + " " + xhr.statusText);
}
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment