json - getJSON problem (jquery) -
I'm trying to submit geternames and passwords for getJSON to serve the webservice and "Hello"
This is my code:
$ GetJSON (address + "? Format = json & jsoncallback =?", {Customer e-mail: email, password: password}, function () {warning ("hello");});
If the http header submits 200 messages, it should be OK, but does not enter the function, do anyone know why?
Are there pages on the same server? Most likely you are violating it.
You can use the parameter named callback
instead of jsoncallback
, blockquote>
JSONP
If the string in the URL is "callback =?" In the URL, the request is considered as JSONP instead. See the discussion of jsonp data type for more information.
So to work in your case, you can get the $ Try Ajax ()
to:
$ Ajax ({url: address + "? Format = json", data: {customer e-mail: email, password: password}, data type: "jsonp", jsonp: "jsoncallback", success: function (data) {warning ("Oh");}});
Comments
Post a Comment