online reaction time test system

This is a discussion on "online reaction time test system" within the JavaScript Forum section. This forum, and the thread "online reaction time test system are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Dec 4th, 2005, 14:08
New Member
Join Date: Dec 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
online reaction time test system

Hello!

I wonder if you can help...!

I have recenly become very intrested in reaction times, and in particular, measuing reacton time when doing an activity (such as on the phone).

Something i,ve wanted to do, for my and my familes use only, (i.e, not commercial/profitable), is to make such a system, whereby, when a red traffic light comes up on screen, the user has to quickly press "the stop button". The timer then stops, and the system will record how long it took the user to press the stop button. This could be repated 5 times or so, with the average time also being displayed for those 5 times.

I want to have this system, because i want to test my family on this system. Then, i want them to re-take this test, but also, at the same time be on a mobile phone (or something similar), and have a conversation, and for me to compaare the results, which should be intresting.

Now, personally, i have no programming knowlege atall, but have been told that javascript could be good for this, and also making use of Dreamweaver, by making it in this programme. (I do want to be able tp put in on my website).

So can anyone advise me on what i should do?

Furthermore, due to my intrest in this, i would also be happy to pay for this type of system to be built by someone, due to my very lack of programming experience, etc.

I know there are quite a few systems like this on the internet already built, but i would like my own

Thanks and i look forward to any replies.

Steve
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Jan 10th, 2006, 09:06
Junior Member
Join Date: Jan 2006
Location: Leeuwarden, NL
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation Re: online reaction time test system

This is a Javascript code for a little programme to test your reaction time. Check it out:
HTML: Select all
<html>
<body>
<script language="JavaScript">
<!-- hiding for old browsers
// response time test, created by Jasper van Zandbeek
// e-mail: jasperz@net-v.com
var startTime=new Date();
var endTime=new Date();
var startPressed=false;
var bgChangeStarted=false;
var maxWait=20;
var timerID;
function startTest()
{
document.bgColor=document.response.bgColorChange.options[document.response.bgColorChange.selectedIndex].text;
bgChangeStarted=true;
startTime=new Date();
}
function remark(responseTime)
{
var responseString="";
if (responseTime < 0.10)
responseString="Well done!";
if (responseTime >= 0.10 && responseTime < 0.20)
responseString="Nice!";
if (responseTime >=0.20 && responseTime < 0.30)
responseString="Could be better...";
if (responseTime >=0.30 && responseTime < 0.60)
responseString="Keep practising!";
if (responseTime >=0.60 && responseTime < 1)
responseString="Have you been drinking?";
if (responseTime >=1)
responseString="Did you fall asleep?";
return responseString;
}
function stopTest()
{
if(bgChangeStarted)
{
endTime=new Date();
var responseTime=(endTime.getTime()-startTime.getTime())/1000;
document.bgColor="white";       
alert("Your response time is: " + responseTime + " seconds " + "\n" + remark(responseTime));
startPressed=false;
bgChangeStarted=false;
}
else
{
if (!startPressed)
{
alert("press start first to start test");
}
else
{       
clearTimeout(timerID);
startPressed=false;             
alert("cheater! you pressed too early!");
}               
}
}
var randMULTIPLIER=0x015a4e35;
var randINCREMENT=1;
var today=new Date();
var randSeed=today.getSeconds();
function randNumber()
{
randSeed = (randMULTIPLIER * randSeed + randINCREMENT) % (1 << 31);
return((randSeed >> 15) & 0x7fff) / 32767;
}
function startit()
{
if(startPressed)
{
alert("Already started. Press stop to stop");
return;
}
else
{
startPressed=true; 
timerID=setTimeout('startTest()', 6000*randNumber());
}
}
// --> 
</script>
<p>Test your Response time!</p>
Click on "Start" first, and wait until the background color changes. As soon as it changes, hit "stop!"
<form name="response">
Change background color in: 
<select name="bgColorChange">
<option selected>deeppink
<option>aliceblue
<option>crimson
<option>darkkhaki
<option>cadetblue
<option>darkorchid
<option>coral
<option>chocolate
<option>mediumslateblue
<option>tomato
<option>darkslategray
<option>limegreen
<option>cornflowerblue
<option>darkolivegreen
</select>
<input type="button" value="start" onClick="startit()">
<input type="button" value="stop" onClick="stopTest()">
</form>
</body>
</html>

Last edited by AnneJan; Jan 10th, 2006 at 12:12.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Jan 10th, 2006, 09:17
Junior Member
Join Date: Jan 2006
Location: Leeuwarden, NL
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation Re: online reaction time test system

And here I have another code for testing your reaction time:

HTML: Select all
<html>
<HEAD>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<title>Javascript Game - test your reaction speed on the selected circles in the hit the dot game</title>


<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
gamelength=30;
timerID=null
var playing=false;
var numholes=6*10;
var currentpos=-1;
function clrholes() {
for(var k=0;k<document.dmz.elements.length;k++)
document.dmz.elements[k].checked=false;
}
function stoptimer() {
if(playing)
clearTimeout(timerID);
}
function showtime(remtime) {
document.cpanel.timeleft.value=remtime;
if(playing) {
if(remtime==0) {
stopgame();
return;
}
else {
temp=remtime-1;
timerID=setTimeout("showtime(temp)",1000);
      }
   }
}
function stopgame() {
stoptimer();
playing=false;
document.cpanel.timeleft.value=0;
clrholes();
display("Game Over");
alert('Game Over.\nYour score is:  '+totalhits);
}
function play() {
stoptimer();
if(playing) {
stopgame();
return;
}
playing=true;
clrholes();
totalhits=0;
document.cpanel.score.value=totalhits;
display("Playing");
launch();
showtime(gamelength);
}
function display(msg) {
document.cpanel.state.value=msg;
}
function launch() {
var launched=false;
while(!launched) {
mynum=random();
if(mynum!=currentpos) {
document.dmz.elements[mynum].checked=true;
currentpos=mynum;
launched=true;
      }
   }
}

function hithead(id) {
if(playing==false) {
clrholes();
display("Push Start to Play");
return;
}
if(currentpos!=id) {
totalhits+=-1;
document.cpanel.score.value=totalhits;
document.dmz.elements[id].checked=false;
}
else {
totalhits+=1;
document.cpanel.score.value=totalhits;
launch();
document.dmz.elements[id].checked=false;
   }
}

function random() {
return(Math.floor(Math.random()*100%numholes));
}
// End -->
</script>

<style type="text/css">
div.inst	{position:relative;
	left:100px;
	color:white;
	}
table.std	{width:250px;
	}
table.vorm	{width:250px;
	}
</style>
</head>
<body bgcolor="#ddeefb">
<div class="std">
<h2>Hit-the-Dot</h2>
Test your reaction speed.<br>
How much selected circles can you click in 30 seconds ?
</div>

<table class="std" cellpadding=3>
<form name="cpanel">
<tr>
<td colspan=2 align="center"><input type="button" name="startstop" value=" Start/Stop Game " onClick="play()"></td>
</tr>
<tr>
<td align="center">Time</td><td align="center">Score</td>
</tr>
<tr>
<td align="center"><input type="text" name="timeleft" size="4" onFocus="this.blur()"></td><td align="center"><input type="text" name="score" size="4" onFocus="this.blur()"></td>
</tr>
<input type="hidden" name="state" size="20" value="Push Start to Play" onFocus="this.blur()">
</form>
</table>


<form name="dmz">

<table class="vorm" cellpadding=1">

<tr>
<td align="center" valign="center"><input type="radio" onClick="hithead(0)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(1)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(2)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(3)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(4)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(5)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(6)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(7)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(8)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(9)"></td>
</tr>
<tr>
<td align="center" valign="center"><input type="radio" onClick="hithead(10)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(11)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(12)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(13)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(14)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(15)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(16)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(17)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(18)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(19)"></td>
</tr>
<tr>
<td align="center" valign="center"><input type="radio" onClick="hithead(20)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(21)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(22)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(23)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(24)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(25)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(26)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(27)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(28)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(29)"></td>
</tr>
<tr>
<td align="center" valign="center"><input type="radio" onClick="hithead(30)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(31)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(32)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(33)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(34)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(35)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(36)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(37)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(38)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(39)"></td>
</tr>
<tr>
<td align="center" valign="center"><input type="radio" onClick="hithead(40)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(41)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(42)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(43)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(44)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(45)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(46)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(47)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(48)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(49)"></td>
</tr>
<tr>
<td align="center" valign="center"><input type="radio" onClick="hithead(50)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(51)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(52)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(53)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(54)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(55)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(56)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(57)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(58)"></td>
<td align="center" valign="center"><input type="radio" onClick="hithead(59)"></td>
</tr>
</table>
</form>

<div>
<big>Instructions</big>
<ul>
<li>Click on the selected circles, random selected by the computer.</li>
<li>One point for one hit-click.</li>
<li>Minus 1 point for a missed click.</li>

<br><br></div>


</body>
</html>

Last edited by AnneJan; Jan 10th, 2006 at 12:11.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
online, reaction, time, test, system

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Online booking system - any suggestions? sitewonders PHP Forum 6 Nov 28th, 2007 17:07
Please speed test (video system) pozitifweb Web Page Design 8 May 24th, 2007 11:41
MI Online Analyst/Management Information/SEO/Online/Email/Folkestone Web JobBot Job Opportunities 0 Jan 10th, 2007 15:12
Adjusting time from server time to local time Tim356 Classic ASP 10 Jun 21st, 2004 14:57


All times are GMT. The time now is 02:54.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42