Saturday, 24 August 2013

can't execute function in getJson

can't execute function in getJson

I'm just beginning to learn jQuery, but I'm stuck at the beginning.
I am not able to execute any function in getJson. I tried to write
seperate function to execute, but it didn't work, so now I tried to
execute simplest possible code but I still can't make it work.
What am I doing wrong?
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>Demo</title>
<script
src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
</head>
<body>
<div id="displayed_data">
</div>
<script>
$(document).ready(function() {
$.getJSON("http://ks3353689.kimsufi.com:5000/v1/closest_pointlng=19.0&lat=50",
function(data){
alert("test");
});
});
</script>
</body>
</html>

No comments:

Post a Comment