Search the Legacy Support Archive (up to v2020)
  1. Read-only archive (2005–2024). Posting is closed. Need help with MediaLab or DirectRT 2027? Email service@empirisoft.com.

    All words · “exact phrase” · -leave out

    Advanced search

Preventing blank fields in custom html form submission

  1. #1

    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

  2. #2
    jarvis24 Blair Jarvis, Administrator
    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
    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
    jarvis24 Blair Jarvis, Administrator
    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=validation

    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