0

background on the topic

ok ive been coding a messaging page which users come on to check their messages,this is done without moving from the page so it uses ajax and json calles to get the data through jquery

my question is

If their a way of checking what checkboxes are *checked and then return there "ids" oh and their could be upto a 100 checkboxes if the user is lazy and doesn't clean his inbox*

if you want to look at what i mean go to http://125.239.244.47/social/ and login with the user test and the password is nothing(not the word) and goto messages on the front page when you login thanks for your help

ryanc1256
  • 570
  • 6
  • 23
  • 4
    http://stackoverflow.com/questions/426258/how-do-i-check-a-checkbox-with-jquery-or-javascript – t q Apr 06 '12 at 05:36
  • Could you try it from javascript?I think it easily done through java script or jquery by looping and add ids of checkbox in array which are checked. – SMK Apr 06 '12 at 05:39
  • thats a good idea i might just try that i didn't even think about even through ive been doing loops all day(php) :-) – ryanc1256 Apr 06 '12 at 05:41

1 Answers1

1

Yep, jQuery has a Checked Selector:

var checkedBoxIds = $("input:checked").id();
Rob Rodi
  • 3,476
  • 20
  • 19