This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Select All Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Select All" Watch "Select All" New topic
Author

Select All

Grishma Dube
Ranch Hand

Joined: Jul 01, 2003
Posts: 275
Hi All,

I've written a javascript function, which is matching to my requirements. But this function doesn't work, if i have just a single box in list.

Pls help me in resolving in this problem. My code :


[ June 24, 2005: Message edited by: Grishma Dube ]
[ June 24, 2005: Message edited by: Grishma Dube ]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
when there is one checkbox, there is no array so you need to account for that. Here is an example below.



Eric
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Select All
 
Similar Threads
Accenture Interview Process
Check/Uncheck All
Passing values from JavaScript to next JSP
Reset Hidden fields
Accessing the form input