5 Replies - 1410 Views - Last Post: 20 April 2013 - 11:28 AM

how can I use tabindex to get location of a checked box in a group?

Posted 15 April 2013 - 12:53 AM

Hi, how can I use tabindex to get the location of a checked box in a group?

Iíve tried creating for loops but couldnít get it to work. After a day of research I thought by adding var indexValue = ($(this).attr('tabindex')); I could get the position of the checked box then use that value to select the correct item.. Cah you please tell me what Iím doing wrong here?

Re: how can I use tabindex to get location of a checked box in a group?

Posted 17 April 2013 - 11:00 PM

I have about 30 different courses that a student can enroll for. A student can be enrolled by sim plying selecting the corresponding checkbox that is inside of a table. Besides the checkbox in each cell, I have dropdown lists of the day that the student will attend class and another dropdown list of the teacher assigned to the enrolled student. That's three controls per cell. Let's say checkbox #3 is selected. I also want to manipulate the other controls that would be in the same position in their respective group. The position of the checked box is the same position of the other controls. I'm not sure that tabindex will do the trick but it seems a logical choice.

Re: how can I use tabindex to get location of a checked box in a group?

Posted 18 April 2013 - 12:06 PM

It's best to not use tables whenever possible as they are much slower to render.
The following code could be compressed a bit, but you have not given much information other than for a template
of how your request might be accomplished.