Empirisoft Support

    Welcome to Empirisoft Support
Results 1 to 4 of 4

Thread: How do I have custom item record responses when time elapses? (case 5079)

  1. #1

    How do I have custom item record responses when time elapses? (case 5079)

    Hi,

    For a project I am working on I would like to give participants a set time period (5 minutes) to enter responses to 10 fill in the blank items that are presented on the same screen. It is my understanding that this requires a custom item.

    I manipulated a file that Blair had posted on the Empirisoft support forum and it seems to work with one issue. As of now, it is only recording data once the "Continue" button is pressed. I would like to have data recorded when the time duration runs out instead (in the questionnaire file, I have set a countdown clock for 5 minutes).

    As of now, when the time elapses, participants are told to press Enter to continue, but what they entered in the boxes is not being saved. I can see the line in the html that probably needs to change, but I am unsure of how to change it properly.

    I have attached the html in case any one can help me.

    Thanks!
    Attached Files Attached Files
    Last edited by jason_reed; 12-15-2015 at 09:06 AM.

  2. #2
    Join Date
    Feb 2011
    Posts
    26

    It's not the HTML . . .

    HTML can only record data that has been submitted. Setting the custom item to display for five minutes means after five minutes, the program will move on, and any data that has not been submitted will be lost.

    Are you familiar with javascript? Because with javascript, which can be included in HTML custom items, you can command that after a set period of time (e.g., 5 min), the form is submitted.

    This can be accomplished with the javascript command [settimeout()].

    If you're not familiar with javascript, here are some resources.

    http://www.w3schools.com/js/js_intro.asp
    http://www.w3schools.com/js/js_timing.asp

    Hope this helps.

  3. #3
    Join Date
    Feb 2013
    Posts
    22
    Hi gnik68. I've attached a slightly updated version of your html. I've added one line of code at the top, <body onload="setTimeout ('document.forms[0].submit()', 600000)">. This will set your custom item to automatically post the entered data after X time has elapsed. In this case it would submit after 10 minutes have elapsed, regardless of whether the continue button is pressed. You can change the 600000 to any number you'd like (I'd suggest setting it to a smaller value to test the code and ensure that the data are recording properly). I hope that helps!
    Attached Files Attached Files

  4. #4
    Hi wcrescioni,

    Thank you so much for the help! That worked perfectly. Again, thanks for taking the time to help me out.

Similar Threads

  1. How do I have a custom item record responses when time expires? (case 4969)
    By gnik68 in forum MediaLab Older Versions: How Do I...
    Replies: 1
    Last Post: 12-15-2015, 09:11 AM
  2. Collecting reaction time data for custom item
    By yzy1986 in forum MediaLab Older Versions: How Do I...
    Replies: 3
    Last Post: 10-06-2010, 01:54 PM
  3. Time Limit on a Custom Item Using HTML
    By petrocjv in forum MediaLab Older Versions: General Questions
    Replies: 3
    Last Post: 08-12-2010, 11:22 AM
  4. Validating Custom Item Required Responses
    By Trevor Newell in forum MediaLab Older Versions: Sharing Area
    Replies: 11
    Last Post: 03-26-2010, 04:18 PM
  5. Submit custom item values to responses.xls
    By Thomas in forum MediaLab Older Versions: How Do I...
    Replies: 5
    Last Post: 10-16-2008, 02:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •