struts2 - Struts 2.0 pass selected checkbox mapping value to JavaScript function -
struts2 - Struts 2.0 pass selected checkbox mapping value to JavaScript function -
i using struts 2 framework , iterating 4 fields (checkbox,rollnumber,name,location) in jsp. working fine. need delete selected checkbox record, require rollnumber(which primary key in table) object pass javascript function. how can pass rollnumber object javascript function. have pass checkbox object(document.myform.subcheckbox) java script function, need pass 1 more rollnumber object.
<table border="1"> <tr> <s:if test="%{mode != 'view'}"> <td><input type="checkbox" id="maincheckbox" onclick="return checkall(document.myform.subcheckbox)"/></td> </s:if> <th>roll number</th> <td>name</td> <td>location</td> </tr> <s:iterator value="beanlist" > <tr> <s:if test="%{mode != 'view'}"> <td> <input type="checkbox" name="subcheckbox"/> </td> </s:if> <td> <s:property value="rollnumber" /> </td> <td> <s:property value="name"/> </td> <td> <s:property value="location"/> </td> </tr> </s:iterator> </table> <table> <s:if test="%{mode != 'view'}"> <tr> <input type="button" value="delete" onclick="return deleterecord(document.myform.subcheckbox) "/> </tr> </s:if> </table>
struts2
Comments
Post a Comment