aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Three of Four fields must have a value. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Three of Four fields must have a value." Watch "Three of Four fields must have a value." New topic
Author

Three of Four fields must have a value.

LaTeef Lusk
Greenhorn

Joined: Mar 28, 2009
Posts: 15
I have a script that is not working. I have four form fields, and I want to script to check that at least 3 of the 4 have a value. When I submit the form it seems to bypass the validation. Please help. My script is below: Any help would be appreciated.

Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18987
    
    8

And it would also help to know what "not working" means. Read this for information about that: ItDoesntWorkIsUseless.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Wow, you can make that code less complicated.

But how are you calling the validation function?

Eric
Travis Hein
Ranch Hand

Joined: Jun 06, 2006
Posts: 161
yea, if you require 3 fields selected, is it important to know which ones not selected.



and maybe this could be called as


Error: Keyboard not attached. Press F1 to continue.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Three of Four fields must have a value.