Skip to content

Commit

Permalink
Add some testing data
Browse files Browse the repository at this point in the history
  • Loading branch information
longouyang committed Nov 1, 2011
1 parent 7002b78 commit ef307b7
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions test.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,22 @@

<script>
var indicator = document.getElementById("indicator");

var o = {a: 1, b: 2}, // object
ao = [{a: 1, b: 2}, {a: 3, b: 4}], // array of objects
oao = { // object with array of objects as the most complex value
condition: "control",
completed: ["red","green","blue"],
data: [
{rt: 500, accuracy: 1, color: "red"},
{rt: 614, accuracy: 0, color: "green"},
{rt: 932, accuracy: 0, color: "blue"}
]
}; // object of array of objects

if (!turk.previewMode) {
indicator.innerHTML = "submitting in 2 seconds...";
setTimeout(function() { turk.submit({a: 1, b: 2}) }, 2000);
indicator.innerHTML = "submitting in 1 second...";
setTimeout(function() { turk.submit(oao) }, 1000);
} else {
indicator.innerHTML = "preview mode";
}
Expand Down

0 comments on commit ef307b7

Please sign in to comment.