Hello. I have a problem with using the jQuery JSONP function $.getJSON in CodeIgniter. The url from which the json is grabbed from is: http://spinly.000space.com/index.php/admin/isloggedin
Now, the problem, is that I have a demo.html file that runs the $.getJSON function and grabs the data from the url I denoted above.
DEMO.html looks like:
<html>
<head>
<script src="http://www.spinly.000space.com/public/js/jquery.js"></script>
<script>
$(document).ready(function(){
var myurl = "http://spinly.000space.com/index.php/admin/isloggedin/&jsoncallback=?";
//myurl = "http://com.lnk.bz/jsonp.php?sleep=3&jsoncallback=?";
$.getJSON(myurl,function(adat) {
alert(adat);
// clearTimeout(t);
});
});
</script>
</head>
<body>
<div id="images">
</div>
</body>
</html>
So when I run the demo.html file nothing happens, although as you can see it's supposed to alert the data returned, when I change the url to a another one that doesn't use CodeIgniter as the framework I get alert function running, although in this case while using the url that's backed up with CodeIgniter it doesn't work.
Does anyone have a solution to my problem? I'd really appreciate if you gave me some feedback.
Thanks!