JSON with PHP and JQUERY - almost there!
I am pretty much learning JSON from scratch and am having some problems finding good resources. I was wondering if anyone here could just help me push this over the line.
Basically my situation is:
I have a server with a CMS. I want information from the CMS to appear on several other sites.
On a PHP Snippet on the 1st server I have:
GET http://localhost/mbff_cms/?jsoncallb...=1338898608228 jquery-1.7.2.js:8123
Obviously I just want to see the word 'Hello' in the console. I just want to pass the PHP variable over to the .html page and display it using jquery.
Can anyone help me get this over the line?
i think you are not close .
You are fetching from the server,
with your jqueery ajax, some text
that has been formatted as jsonp,
if you don't fully understand what
i just said then, you are really
not close at all.
Ajax usually only works
in the same domain while
jsonp can be called from
a different domain .
No good reason i can
think of for mixing the
two as you have ?
Would I be better replacing the Ajax with something like:
this works on the same server ...
with a function call ...
this will work on remote server ...
|All times are GMT +1. The time now is 08:46 PM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.