我如何定义什么是“提交"?按钮返回机械土耳其人? [英] How do I define what the "submit" button returns on Mechanical Turk?

查看:15
本文介绍了我如何定义什么是“提交"?按钮返回机械土耳其人?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 HTML/JavaScript(编辑源代码部分)为 mTurk 编写自己的 HIT 模板.MTurk's的worker响应格式是一个excel文件,里面有各种参数(如assignment IDworker 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆