JSON |
[eluser]Unknown[/eluser]
Hello. I have a problem with using the jQuery JSON 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: Code: <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!
[eluser]pistolPete[/eluser]
General advice: Use Firebug to monitor network requests: http://getfirebug.com/ I just tried to access http://spinly.000space.com/index.php/admin/isloggedin/ and I got a valid JSON response. But if I access http://spinly.000space.com/index.php/adm...oncallback;=? I get Quote:An Error Was Encountered So removing &jsoncallback;=? should solve this issue.
[eluser]Unknown[/eluser]
[quote author="pistolPete" date="1239860568"]General advice: Use Firebug to monitor network requests: http://getfirebug.com/ I just tried to access http://spinly.000space.com/index.php/admin/isloggedin/ and I got a valid JSON response. But if I access http://spinly.000space.com/index.php/adm...oncallback;=? I get Quote:An Error Was Encountered So removing &jsoncallback;=? should solve this issue.[/quote] I've tried removing that and nothing.
[eluser]ggoforth[/eluser]
Is this a cross domain Ajax request? If so it shouldn't work. You need to call a dynamic script on your server that can access the data and pass the json back to the requesting javascript. Let me know if that helps. Greg |
Welcome Guest, Not a member yet? Register Sign In |