简体   繁体   中英

How do I define what the “submit” button returns on Mechanical Turk?

I'm writing my own HIT template for mTurk with HTML / JavaScript (editing the source section). MTurk's format for workers' response is an excel file with various parameters (such as assignment ID , worker ID , etc.). I'm having trouble finding out how do modify this returned excel file, in order to include my own custom parameters in it.

<html>
      <script type="text/javascript">
           //many functions
           var myObject = {};
           //event listeners add attributes to myObject
      </script>
</html>

The answer to my HIT is the content of myObject , so I need to link it to the submit button and add it to the outputted excel file.

When using HTMLQuestion , your template is the one creating the submit button. When the submit button is clicked, you need to cause that to POST the contents of myObject to the external submit endpoint (eg https://www.mturk.com/mturk/externalSubmit ). To do that, you could follow a recipe like this: POST data in JSON format

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM