Empirisoft Support

    Welcome to Empirisoft Support
Results 1 to 4 of 4

Thread: Duration Parameter Not working with Custom Item

  1. #1

    Duration Parameter Not working with Custom Item

    I have a custom item that I would like participants to stay on for a minimum of 25 secs. As such, I would like the "continue" button not to show up unitl after 25 secs have elapsed. To this end, I put (d-25) in the parameters box of the item. But it's not working. What's going on? Any thoughts?
    Thanks!
    Last edited by jarvis24; 04-02-2008 at 04:29 PM.

  2. #2
    Join Date
    Nov 2005
    Posts
    3,328
    Rather than timing the custom item via MediaLab, try adding this javascript to your custom item so that the continue/submit button will be disabled for whatever amount of time you like. In this sample script the button in the HTML form will be disabled for the first 10 seconds.
    Code:
    <script language="javaScript">
    <!--
    continue_at = "10000";
    function continue_timer() { self.setTimeout("continue_enable();",continue_at); }
    function continue_enable() 
    { 
    var submitObj = document.getElementById('continue_button');
    submitObj.disabled = false;
    } 
    //-->
    </script>
    <body onLoad="continue_timer();">
     <form method="post">
      <p>Your Answer: <input type="text" name="var" size="20"></p>
      <p><input name="continue_button" type="submit" value="Continue" disabled></p>
     </form>
    </body>
    Attached Files Attached Files

  3. #3
    Thanks! Where should this go in the html? At the beginning? At the end? DOes it matter?

  4. #4
    Join Date
    Nov 2005
    Posts
    3,328
    I've attached a revised version of your custom item with the script added in. Let me know if it works ok!

    Yes - I ended up figuring out how to write it myself, but I plugged yours in and it worked, too. Thanks again!
    Attached Files Attached Files
    Last edited by jarvis24; 02-20-2008 at 04:03 PM.

Similar Threads

  1. Custom item - Autosum
    By akipaki_sf5 in forum MediaLab Older Versions: Sharing Area
    Replies: 16
    Last Post: 12-06-2008, 02:31 PM
  2. Command Line Parameter not working properly
    By jacob in forum MediaLab Older Versions: Troubleshooting
    Replies: 6
    Last Post: 10-07-2008, 06:12 PM
  3. Blank screen on custom item
    By njsporn in forum MediaLab Older Versions: Troubleshooting
    Replies: 1
    Last Post: 07-27-2007, 07:17 AM
  4. Hiring a programmer for a custom item?
    By jarvis24 in forum MediaLab Older Versions: How Do I...
    Replies: 3
    Last Post: 11-17-2006, 08:26 AM
  5. custom item with background image
    By rkozink in forum MediaLab Older Versions: How Do I...
    Replies: 1
    Last Post: 05-04-2006, 01:10 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
  •