The sample code that you reference creates all of its parameters before setting up the save () method. This is the step you are missing; you need to create the activeArtworks parameter in your gallery instance. Your update does not work because you are trying to update a property that has never been created.
I would expect this code to work, although I have not tested it, because parse.com requires you to set up an account to run any code, which is stupid, and I did not want to create it:
var Gallery = Parse.Object.extend("Gallery"); var gallery = new Gallery(); var activeArtworks = 0; gallery.activeArtworks = [];
It is also possible to check if there is any information in the 400 error headers (the debug console in your browser displays them on the "Network" tab). I would expect Parse to provide you with some information that will help you debug problems, and that the only place it would put for an HTTP error.
Dan m
source share