Thursday, June 20, 2013

HTML Worker ID Checker

One of the most helpful HTML codes is the Worker ID Check, which allows Workers to verify whether they are eligible to complete a HIT. The Requester decides who is not eligible and enters the IDs in the code below.  If you want to skip the HTML code, then you can list the Worker IDs in the HIT.

Note that this code does not prevent ineligible Workers from submitting a HIT; it simply gives them the opportunity to check their eligibility. However, I've found that very few Workers risk their approval ratings on a HIT they know they aren't qualified to submit.

Here's an example of a Worker ID Checker:
Have you ever completed one of my HITs? Enter your Worker ID in the box below to find out.  Do not include spaces.

To include a Worker ID Check in your HIT, do the following:
  1. Create a list of Worker IDs that are not eligible to complete the HIT.
  2. Copy and paste the code below in MTurk's Design Layout.
  3. Edit the highlighted areas with information that is relevant to your study, including Workers IDs and instructions.
  4. Preview your HIT, and test your code to make sure its working.

<script language="javascript">
                                function check() {
                                    var answer=document.getElementById('answer');
                                    var idcheck=document.getElementById('idcheck').value;
                                    idcheck=idcheck.toUpperCase();
                                    if (idcheck=="WorkerID1" ||
    idcheck=="WorkerID2" ||
    idcheck=="WorkerID3")
                                      {
                                                answer.innerHTML='You have already completed this survey, and you are ineligible to complete it again. Please return the HIT.';
                                      }

                                    else
                                      {
                                                answer.innerHTML='You have NOT completed this survey. Please continue.';
                                      }
                                    }
    </script>
<div style="margin-left:20%;margin-right:20%;">
<p style="text-align: center;"><input type="text" name="idcheck" id="idcheck" /></p>
<p style="text-align: center;"><input type="button" onclick="check();" value="Enter Worker ID &amp; Check Eligibility" /></p>
</div>
<div style="font-weight:bold;font-family:sans-serif;text-align:center;color:red;" id="answer">&nbsp;</div>

No comments:

Post a Comment