aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Most recently selected checkbox 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 "Most recently selected checkbox" Watch "Most recently selected checkbox" New topic
Author

Most recently selected checkbox

J Chung
Greenhorn

Joined: Jan 25, 2006
Posts: 9
Greetings,

I have a bunch of checkboxes, and I have an alert that informs the user when he has selected the maximum number of selections. So say my maximum is six: once the user clicks on his sixth checkbox, the alert appears.

What I'm trying to do is to prevent the user from selecting a seventh checkbox unless he deselects one of the six already selected. I can retrieve all the checkbox elements as one array and access each checkbox via its index, but how can I reliably retrieve the index of the most recently selected checkbox (i.e., the index of the seventh checkbox so I can set its "checked" attribute to "false")?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6




Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Most recently selected checkbox