Skip to content

Instantly share code, notes, and snippets.

@harshals
Created January 19, 2011 12:34
Show Gist options
  • Save harshals/786111 to your computer and use it in GitHub Desktop.
Save harshals/786111 to your computer and use it in GitHub Desktop.
<script>
function onLoadMe(data){
alert(data);
}
$().ready(function(){
var url = 'http://192.168.2.4:5000/api/Book?callback=onLoadMe';
$.ajax( {
url : url,
dataType: "jsonp",
jsonp : "onLoadMe",
complete: function(data) {
alert("me");
},
success: function(data) {
// can use 'data' in here...
alert(data);
}
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment