Thanks:  0
Likes:  0
Dislikes:  0

# Thread: How to select one check box on each group of four

1. ## How to select one check box on each group of four

Hi

I am getting checkboxs dynamically by group of 4.

group1 4
group2 4
group3 4
...
..
I want select one check box each group, but this groups getting dynamically
some time 4 groups, totally 16 check boxes
soem times 2 groups, totally 8 check boxes

Please give me some suggestions, its really appriciated.

2. ## Re: How to select one check box on each group of four

Please can any one through some light on this.

3. ## Re: How to select one check box on each group of four

In whatever code you use to collect the groups(posting that would be helpful), just insert some within that logic to set one of the four.

4. ## Re: How to select one check box on each group of four

What is the name of the checkbox? Does that follow any pattern?

5. ## Re: How to select one check box on each group of four

Hi Tarun,

These are names of the check boxes
chkorgional_1
chkduplicate_1
chknotrequired_1

above 4 check boxes for group1
and same check boxes coming for group2 with _2
like this groups coming dynamically, I want select atleast one check box for each group.

Thanks

6. ## Re: How to select one check box on each group of

You need to check these checkboxes randomly?

7. ## Re: How to select one check box on each group of

No, Tarun

I need to select at least one check box in each group, only issue here is this groups coming dynamically. Not knowing how many groups coming each iteration.

Thanks

8. ## Re: How to select one check box on each group of

this can be done by following

1. get the total count of the check boxes of a particular name. here,the names of checkboxes are same before "_". use descriptive here.

2. the total number of count will correspond to the total number of groups

3. start a for loop from 0 to number of groups -1. Initialize the random numbers' max and min range for each iteration

4. select the random check box

For more detail , please visit

"http://worldofautomation.wordpress.com/2010/03/23/how-to-select-one-check-box-from-random-number-of-groups/"

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.