Link to home
Start Free TrialLog in
Avatar of curious81
curious81

asked on

how can i check all the checkboxes in struts?

I have got an iterator tag as follows...The rows are populated from the database. Now I have a select All check box which should select all the checkboxes..(rowUpdated) in the iterator.

<input type="checkbox" name="selectAll" onclick="check()">


<logic:present name="seasonForm" property="fieldVOList">


<logic:iterate id="fieldVOList" name="seasonForm" property="fieldVOList" type="com.vfc.stride.vo.SeasonVO" scope="session" indexId="index">
<tr valign="top" class="highlightblueshade">
<td width="5%" height="24" align="center">
<html:checkbox name="fieldVOList" indexed="true" property="rowUpdated" value="true"/>&#160;
                                                    </td>
<td class="textnormal" valign="middle" width="20%">&#160;
<bean:write name="fieldVOList" property="seasonDesc"/></td>
</tr>
                                                                </logic:iterate>
            </logic:present>

I am not able to obtain the fieldVOList  in javascript..check() function. Can anyone help?? How is it to be done using struts???



ASKER CERTIFIED SOLUTION
Avatar of stanley_loh
stanley_loh

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of curious81
curious81

ASKER

That one was helpful..thanx a lot
Thanks for the point!