Question : Javascript checked toggle boxes not working capturing unchecked

Hello experts,

Javascript, ASP

I am using the code below to capture values on an ASP page when the user checks the checkbox. The user can only select three boxes.

The problem I am having is the code does not allow for the user unchecking a box, and selecting another one. i.e. 1, 2, 3, unselect 2, select 4 = 3 checked boxes.

I need to add a piece that will capture the unselect and remove the value from the string that is being built.

Hope this makes sense.

I do not know enough about java to know where or how to add the code.
.
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
Open in New Window Select All

Answer : Javascript checked toggle boxes not working capturing unchecked

What is the checkedRows element?  Can you show a working version of this complete page in html?  Just a few checkboxes (i.e. 5 or so) would be enough.  To provide a specific fix  I need a little better idea of the page.  At least the checkboxes so if there is a lot of other stuff then a dummy, simple page would work.

It should be pretty easy to fix and do but the html is a key and isn't clear still.

bol

Random Solutions  
 
programming4us programming4us