我如何定义什么是“提交"?按钮返回机械土耳其人? [英] How do I define what the "submit" button returns on Mechanical Turk?
问题描述
我正在使用 HTML/JavaScript
(编辑源代码部分)为 mTurk
编写自己的 HIT 模板.MTurk's
的worker响应格式是一个excel文件,里面有各种参数(如assignment ID
、worker ID
等).我不知道如何修改这个返回的 excel 文件,以便在其中包含我自己的自定义参数.
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>
我的HIT
的答案是myObject
的内容,所以我需要把它链接到提交按钮并添加到输出的excel文件中.
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.
推荐答案
当使用 HTMLQuestion,您的模板是创建提交按钮的模板.单击提交按钮时,您需要将 myObject
的内容 POST 到外部提交端点(例如 https://www.mturk.com/mturk/externalSubmit
代码>).要做到这一点,您可以遵循这样的方法:以 JSON 格式发布数据
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
这篇关于我如何定义什么是“提交"?按钮返回机械土耳其人?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!