I'm trying to contact a server using $.get(). I don't care about the response. My purpose is to log some data about a user's action (what they clicked, etc). When the user clicks something, $.get is called like so:
$.get(
"http://www.some-server.com/log.txt?click=1",
function (data)
{
},
"text"
);
The server handles that get request accordingly. I get the following error when the function executes:
XMLHttpRequest cannot load ... is not allowed by Access-Control-Allow-Origin.
If I change datatype to jsonp, I do not get that error but when the jquery callback tries to evaluate the log server's response as JSON, it tells me "whateverwasreturned" is not defined. I'm not able to change anything on the log server.