I'm starting from scratch here just trying to get the basic connection between intel and parse working. I set up the parse web service in Intel-XDK and copied the necessary javascript test code from Parse into my js file. I attached a button click to trigger the parse code and this is what I get. The parse object "error.message" says unauthorized when I cancel the window.
In addition to this problem, when I test it on my device, I don't even get any of that, nothing happens at all. No Login window, no error message. What gives?
var Parse;
Parse.initialize('*******dDOsWAqqUKjQMFN','*******O1bcmTUj7o7Bep');
var document;
document.addEventListener("DOMContentLoaded", function() { var clickCount = 0;
document.getElementById("myJsTest").addEventListener("click", function() {
clickCount++;
var venue = Parse.Object.extend("venue");
venue = new venue();
venue.save({
score: 1337,
playerName: "Sean Plott",
cheatMode: false
}, {
success: function(venue) {
// The object was saved successfully.
document.getElementById("clickCounter").textContent = "successful post";
},
error: function(venue, error) {
// The save failed.
// error is a Parse.Error with an error code and message.
document.getElementById("clickCounter").textContent = error.message;
}
});
document.getElementById("clickCounter").innerText = "Click Count: " + clickCount;
});
});