I have a table with checkbox and text input column. The last row in the checkbox column has a “Check All” link.
Upon Check All click:
1: Text must change “Uncheck All”
2: Check the box above in the column and set textbox text = 500.
Upon “Uncheck All”:
1: Text must change “Check All”
2: Uncheck the box and clear the textbox.
But point 2 above is not working properly.
Steps:
1: Click “Check All” – Text changes to “Uncheck All” and box is checked but it does not set the Textbox to 500.
2: Click “Uncheck All” – Text Changes to “Check All” and box is unchecked but now it sets the textbox to 500.
I think it is some event handling issue but I haven’t figured it out so far.
Any ideas what’s going on?
Note: I will have to use “onclick” because my actual code is .aspx page which doesn’t recognize onchange with checkbox.
Updated code Sample.
The function onClick() and setValue() runs before click() applies a check on to the checkbox;
Therefore at step 1, it does not see the check box checked.