Skip to content

Instantly share code, notes, and snippets.

@jcnesci
Created June 26, 2014 00:36
Show Gist options
  • Save jcnesci/8838a68a5a8e555ac353 to your computer and use it in GitHub Desktop.
Save jcnesci/8838a68a5a8e555ac353 to your computer and use it in GitHub Desktop.
Open311 JSONP test #2 - basic JSONP
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head>
</head>
<body>
<script src='https://mayors24.cityofboston.gov/open311/v2/requests.json?callback=processJSON&page=1&page_size=250'></script>
<script type="text/javascript" charset="utf-8">
// Based on this example: http://schock.net/articles/2013/02/05/how-jsonp-really-works-examples/
function processJSON (json) {
// Do something with the JSON response
console.log(json); // nothing prints.
};
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment