Solved

search checkboxes checked

Posted on 2008-10-20
2
1,063 Views
Last Modified: 2013-11-11
I'm trying to search all checkboxes checked in a certain div.  Unfortunately what's below only pulls out the checkboxes that have checked set in the markup, as opposed to what has since been checked (or unchecked) manually.  Is it possible to make this more dynamic, or is this just the nature of CSS Selectors.

var f = $$('div#cbDiv input[type="checkbox"][checked=checked]');
0
Comment
Question by:ARACK04
2 Comments
 
LVL 15

Accepted Solution

by:
MMDeveloper earned 500 total points
Comment Utility
this is untested...


var f = $$('div#cbDiv input[type="checkbox"]').reject(function (el) {return !(el.checked)});

should return an array of checkboxes inside the div#cbDiv that are checked
0
 

Author Closing Comment

by:ARACK04
Comment Utility
Perfect.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Today I would like to talk about localizing (Internationalization) JavaScript applications. Introduction When creating an application that is going to be used by many people around the globe, it is important to remember that not everyone speak…
This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now