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 How to iterate over enumerated Check List (check boxes) using JQuery? 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 "How to iterate over enumerated Check List (check boxes) using JQuery?" Watch "How to iterate over enumerated Check List (check boxes) using JQuery?" New topic
Author

How to iterate over enumerated Check List (check boxes) using JQuery?

James Dekker
Ranch Hand

Joined: Dec 09, 2006
Posts: 215
Hello there, I have the following check list (containing 2 check boxes which have 2 different e-mail addresses in them):



Am able to use a JavaScript event listener to populate / remove from a text field, everytime a user clicks on an individual check box using this:



However, I now have an enumerated check list... Just need to append / concatenate the index number (which I stored in an hidden field and can always obtain the
correct one), but can't seem to see how to pass in the second iterator's "input:checkbox:checked".

Here's the HTML source of the checked list:



JavaScript:



The browser says that ($test).each() throws an exception which is not caught and this is not allowed...

What am I possibly doing wrong?

Many thanks for reading this...
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to iterate over enumerated Check List (check boxes) using JQuery?
 
Similar Threads
How to iterate over Div and extract individual check box values?
reading a nested list with javascript
pass a variable in the URl
Trying to use tagify plug-in to populate text field with dynamic labels
How to setup a single checkbox to toggle / untoggle other check boxes?