File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes Check Box and Hidden field Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Check Box and Hidden field" Watch "Check Box and Hidden field" New topic

Check Box and Hidden field

Sajan Patel
Ranch Hand

Joined: Oct 25, 2004
Posts: 77

* JSP generate either hidden type or checkbox type
* Now I have 10 different field from some1 to some10
* Each time jsp will generate different type for same field but only one field in one page (like Some1 may be hidden type or may be checkbox but only one)
Now I would like to create one Java Script which validate that user selected atleast one checkbox.
My Logic is first check Some1 field of form is check box or not if yes then find out is it checked or not. but i dont know how to find out Some1 field is checkbox or hidden type.

Thanks in advance

Sajan Patel
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
This is the basic framework for what you are trying to do.

[ November 29, 2004: Message edited by: Eric Pascarello ]
Sajan Patel
Ranch Hand

Joined: Oct 25, 2004
Posts: 77
I agree. Here's the link:
subject: Check Box and Hidden field
jQuery in Action, 3rd edition