问题
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.
To simplify, my code is:
<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.
回答1:
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 (e.g. https://www.mturk.com/mturk/externalSubmit
). To do that, you could follow a recipe like this: POST data in JSON format
来源:https://stackoverflow.com/questions/51246928/how-do-i-define-what-the-submit-button-returns-on-mechanical-turk