Snippets Collections
var endExperiment = function() {

  prompt_resubmit = function() {
    replaceBody(error_message);
    $("#resubmit").click(resubmit);
  };

  resubmit = function() {
    replaceBody("<h1>Trying to resubmit...</h1>");
    reprompt = setTimeout(prompt_resubmit, 10000);
    
    psiTurk.saveData({
      success: function() {
          clearInterval(reprompt); 
      }, 
      error: prompt_resubmit
    });
  };
  // Load the debriefing page 
  psiTurk.showPage('debriefing.html');

  //code for bonus??
  $("#next").click(function () {
      record_responses();
      psiTurk.saveData({
            success: function(){
                psiTurk.computeBonus('compute_bonus', function() { 
                  psiTurk.completeHIT(); // when finished saving compute bonus, the quit
                }); 
            }, 
            error: prompt_resubmit});
  });
star

Wed Jun 02 2021 18:58:00 GMT+0000 (UTC) https://stackoverflow.com/questions/61445528/how-to-save-data-from-app-engine-to-datastore-google-cloud-javascript

#data #javascript #jspsych
star

Wed Jun 02 2021 17:37:05 GMT+0000 (UTC) https://github.com/danieljwilson/ObjectVsTask

#js #jspsych #data #saving

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension