Created
February 18, 2012 16:23
-
-
Save ldaniel/1860036 to your computer and use it in GitHub Desktop.
Load page response content
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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