PEEP

Programming Economic Experiments with Php/mysql

with contributions by:
Jeroen van de Ven
Lucas Molleman
Boris van Leeuwen
Jona Linde
Joep Sonnemans
Roel van Veldhuizen

How to prevent that participants makes an immediate choice (before reading the problem)

Sometimes you would like a delay between the presentation of the decision situation and the possibility to make a choice. This can be easily done in javascript. The relevant buttons are only displayed some seconds after the page is loaded. In the body statement you refer to a javascript function opdracht(). The javascript opdracht() waits 5000 milliseconds before referring to another function vulin() who than fills in the field with id 1 the html code for the submit button.

<body onload="opdracht()" text=#000000>
<SCRIPT LANGUAGE="JavaScript">
	function opdracht()
	{setTimeout("vulin()",5000);
	}
	function vulin() {
	document.getElementById("1").innerHTML = "<input type=\"submit\" name=\"verzend\" id=\"button\" value=\"verzend\" />";
	}
</SCRIPT>
<form>
	//Here other elements of the form like inputs or radio buttons, submit button appears after delay
	<p align=center>
	<div align=center id="1"></div>
	</p>
</form>