Form data submit to e-mail possibly? |
Form data submit to e-mail possibly? |
PsychGuy |
Nov 6 2014, 02:21 PM
Post
#1
|
Group: Members Posts: 1 Joined: 6-November 14 Member No.: 21,782 |
Hello all, first time posting here.
I have searched for an answer to this as much as i possibly could, so I hope this has not been answered already! I am very new to programming and have recently delved into it for a psychology class. My question is: Is there a way to submit the data from a timing button to an email? I need to record the times of each of my participants and if I can get the data sent to me they can do it at home and my pool of participants will be much larger. Here is the code: <html> <head> <title>Numerical Stroop Effect</title> <script language="Javascript"> var NowDate =new Date(); var timeOne var timeTwo var timer function startIt() { timeOne=NowDate.getTime(); } function endIt() { timeTwo=new Date(); timeTwo=timeTwo.getTime(); timer=((timeTwo-timeOne)/1000); alert("It took you "+timer+" seconds. Please Allow the researcher to record this time"); } //document.forms[0].elements[0].value=(timer); </script> </head> <body onload="startIt()";> <p> <Center><h2>Array #2</h2> <table border=2 cellpadding=5 cellspacing=15> <tr> <td align=center>Two<br>Two<br>Two</td> <td align=center>Four</td> <td align=center>Three<br>Three</td> <td align=center>One<br>One<BR>One</td> <td align=center>Five<br>Five<br>Five</td> <td align=center>Four<br>Four<br>Four<br>Four<br>Four</td> <td align=center>Five</td> <td align=center>Three<br>Three<br>Three<br>Three</td> </tr> <tr> <td align=center>Two<br>Two<br>Two</td> <td align=center>Five</td> <td align=center>Three<br>Three</td> <td align=center>One<br>One<BR>One</td> <td align=center>Four<br>Four</td> <td align=center>Two<br>Two<br>Two<br>Two<br>Two</td> <td align=center>Three<br>Three<br>Three<br>Three</td> <td align=center>Five<br>Five<br>Five</td> </tr> <tr> <td align=center>One<br>One<br>One<br>One<br>One</td> <td align=center>Five<br>Five</td> <td align=center>Four<br>Four<br>Four</td> <td align=center>Three<BR>Three<br>Three<BR>Three</td> <td align=center>Two</td> <td align=center>Five<br>Five<br>Five<br>Five</td> <td align=center>Four<br>Four<br>Four</td> <td align=center>One<br>One</td> </tr> </table> <p> <form> <input type="button" value=" Finish " onclick="endIt()";> </FORM> <br><br><A HREF = "https://www.sixpixfix.com/taskready3.html">Continue Experiment</A><P> </body> </html> Thank You for any responses. |
pandy |
Nov 6 2014, 02:34 PM
Post
#2
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
I suppose. But you would need server side scripting for the actual email sending. Your only other option is mailto, and as that works they can change the data entered at will (it only opens an email client with a prefilled email - if it works at all).
|
Brian Chandler |
Nov 6 2014, 11:46 PM
Post
#3
|
Jocular coder Group: Members Posts: 2,460 Joined: 31-August 06 Member No.: 43 |
The way to do this is to record the data in a database -- this would be an extremely simple application. Then the button click can fire a javascript call to the DB script.
You need to think about precision: the test (?whatever it is) needs to be long enough that random delays do not mess up the data. I presume security is not an issue; i.e. your subjects are trusted to be cooperative. |
Lo-Fi Version | Time is now: 25th April 2024 - 11:44 PM |