I am listing a data from a database in a table, at the end of each row I have a delete button, I want when I click on that button collect all data of the row so I can send it through ajax :
<logic:iterate id="ametadataEntry" name="ametadataList">
<tr id='<bean:write name="ametadataEntry" property="agentId" />'>
<td class="center"><bean:write name="ametadataEntry" property="agentName" /></td>
<td class="center"><bean:write name="ametadataEntry" property="lhsKey" /></td>
<td class="center"><bean:write name="ametadataEntry" property="rhsValue" /></td>
<td class="center"><bean:write name="ametadataEntry" property="propertiesFileName" /></td>
<td class="center">
<html:link action="ShowAgentMetadataDetail.do?agentId=${ametadataEntry.agentId}&lhsKey=${ametadataEntry.lhsKey}&days=${days}" styleClass="linkButton">
<bean:message key="label.viewDetails"/>
</html:link>
</td>
<td class="center"><html:link action="ShowAgentMetadataEdit.do?agentId=${ametadataEntry.agentId}&lhsKey=${ametadataEntry.lhsKey}&days=${days}" styleClass="linkButton">Edit</html:link></td>
<td class="center"><input type="submit" name="delete" value="Delete" class="delete" title="Delete" /></td>
<td class="center"><bean:write name="ametadataEntry" property="disabled" /></td>
</tr>
</logic:iterate>
$.ajax({
url: "deleteMetadata.do",
data: form.serialize(),
success: function(response) {
// alert(response.message);
toastr.success(response.message);
}
})
But the html page has only a display table, no form, no inputs .
Thanks.