I have the following restful api ajax call:
$.ajax({
type: "POST",
url: "https://website.com/a/login",
data: data,
dataType: "json"
})....
where data is:
data["login"]="username";
data["pass"]="1234";
the problem is that this code only works when run from my domain. But when I put this code to run externally, for example from jsfiddle: http://jsfiddle.net/ or from phonegap. This no longer works, and returns me with nothing.
How would I remedy this?