Empirisoft Support

    Welcome to Empirisoft Support
Results 1 to 4 of 4

Thread: Preventing blank fields in custom html form submission

  1. #1
    Join Date
    Jun 2008
    Posts
    46

    Preventing blank fields in custom html form submission

    I'm using an html form to collect time of day information in 3 fields (hours, minutes, am/pm). I've had some problems with subjects leaving one or more fields blank, so I want to make sure they are all filled in before the info can be submitted.

    I've added a javascript to the html page which checks the form for blanks before submission is allowed. It works when the page is opened in a standard browser, but within medialab, its as if the script isn't there... ie it allows blanks without any argument.

    Can anyone suggest A) how to make my script work OR B) a better way to check for blank html fields OR C) a better way to collect time of day info in medialab.

    I've attached the .que, the html file, and the JS script.

    Thanks,

    Jon
    Attached Files Attached Files

  2. #2
    Join Date
    Nov 2005
    Posts
    3,328
    When you say a standard browser, which one(s) do you mean. It's got to work in Internet Explorer and I just tried that and it let me through without validating. Hmm.

  3. #3
    Join Date
    Jun 2008
    Posts
    46
    Ah. I was testing it using Firefox. Can anyone help out with a similarly functioning script that will work in IE?

    Thanks,

    Jon

  4. #4
    Join Date
    Nov 2005
    Posts
    3,328
    Not a javascript expert myself--most of the script I hunt down on the internet. There have been some useful posts on this though--e.g.,

    www.google.com/search?hl=en&sitesearch=support.empirisoft.com&q=v alidation

    Note this search link came from clicking "Google Search" at the top of this page and entering "validation" as a search term. It allows you to use Google search syntax to check the entire support site.

    See also: http://www.empirisoft.com/support/showthread.php?p=9705
    Last edited by jarvis24; 03-24-2010 at 05:37 AM.

Similar Threads

  1. Display blank responses as blank instead of as <variable>
    By Tess in forum MediaLab Older Versions: How Do I...
    Replies: 8
    Last Post: 11-18-2008, 09:04 AM
  2. custom item - html text input being saved without commas
    By mfkomorowski in forum MediaLab Older Versions: Troubleshooting
    Replies: 5
    Last Post: 03-10-2008, 05:32 PM
  3. Reaction time data for custom HTML item
    By lekyung in forum MediaLab Older Versions: General Questions
    Replies: 2
    Last Post: 10-31-2007, 09:51 AM
  4. Blank screen on custom item
    By njsporn in forum MediaLab Older Versions: Troubleshooting
    Replies: 1
    Last Post: 07-27-2007, 07:17 AM
  5. Saving Data from Custom HTML Text Boxes
    By brewer in forum MediaLab Older Versions: How Do I...
    Replies: 3
    Last Post: 09-26-2006, 03:25 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
  •