File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes checkbox property 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 "checkbox property" Watch "checkbox property" New topic
Author

checkbox property

meghana maganti
Greenhorn

Joined: Sep 13, 2005
Posts: 11
I have a group of checkboxes in my jsp page and i am trying to give
this part of code in javascript and using mozilla firefox browser but it complaines as the property length is "undefined"

for(var i=o; i<document.forms[0].ch_pk.length; i++) {

if(document.forms[0].ch_pk[i].checked == true) {
........
}

}
Marc Larochelle
Greenhorn

Joined: Sep 16, 2005
Posts: 14
ch_pk is a checkbox?
What "length" sould return?
I don't think that you can "group" checkboxes, you can only do that with radio buttons no?
meghana maganti
Greenhorn

Joined: Sep 13, 2005
Posts: 11
Hi Marc,

I am trying to display the checkboxes in a column when a list is iterated and checkbox lenght should return the number of checkboxes and from that i am trying to retrieve the ones that are checked in a JavaScript
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: checkbox property