I am working on making Bookmarklet.
I'm trying to get stat : fail after my submit function finish: If stat is pass or fail. Will then make a decision according to that.
I have idea about JSON with Ajax but in this we don't have JSON.
Json will look something like this.
function Check(Content) {
response = JSON.parse(Content);
Result = response.stat;
if (Result == ok) {
Gotit();
} else {
Fail();
};
};
So any idea how it can be read as it has no JSON?
If JSON is not defined you have to include the json2 library in your page before using it, the
the issue seems to be that the response JSON is the first element of an array(Content). Did you try
response = JSON.parse(Content[0])