I'm working on an Ajax project. Everything on my page works, including this section:
var data = {
doc: "sample",
action: "updatemsg",
dbid: 97,
message: "text"
};
$.ajax({
url: ANNOTATION_ENDPOINT,
data: data,
success: console.log,
error: console.log
});
However, on every request, it throws this error:
Uncaught TypeError: Illegal invocation jquery.js:974
fire jquery.js:974
self.fireWith jquery.js:1084
done jquery.js:7803
callback jquery.js:8518
and the console.log
calls are never made. ANNOTATION_ENDPOINT
is a valid URL; my other functions use it with no problem.
I've broken down the problem to this small section but I'm baffled here. Any insight?