I have an HTML table that is populated from a multiple select and query. I need users to be able to add items to the resulting table dynamically without me adding x number of blank rows in case. This is my code to create the table:
<cfquery datasource="ABCBulkDB" name="ItemListQ">
select * from Items_Matrix
where ItemMat_id in (#form.items#)
</cfquery>
<form action="BItemChoice.cfm" method="post">
<table align="center" border="1">
<tr>
<td width="300">Item</td>
<td width="50">Number Inc in Charge</td>
<td>Quantity</td>
<td width="10">Charge</td>
</tr>
<cfoutput query="ItemListQ">
<tr>
<td width="300">#ItemMat_Desc#</td>
<td>#ItemMat_RuleVal#</td>
<td><input type="Text" name="Qty" size="10"></td>
<td width="10">#ItemMat_Charge#</td>
<td><input type="Checkbox" name="Chk1"></td>
</tr>
</cfoutput>
<tr>
<td width="300"><input type="Text" name="ItemDesc" size="50"></td>
<td><input type="Text" name="Rule" size="8"></td>
<td><input type="Text" name="Qty" size="10"></td>
<td width="10"><input type="Text" name="Chge" size="10"></td>
<td><input type="Checkbox" name="Chk1"></td>
</tr>
</table>
</form>
any help will be gratefully recieved
Liz
<cfquery datasource="ABCBulkDB" name="ItemListQ">
select * from Items_Matrix
where ItemMat_id in (#form.items#)
</cfquery>
<form action="BItemChoice.cfm" method="post">
<table align="center" border="1">
<tr>
<td width="300">Item</td>
<td width="50">Number Inc in Charge</td>
<td>Quantity</td>
<td width="10">Charge</td>
</tr>
<cfoutput query="ItemListQ">
<tr>
<td width="300">#ItemMat_Desc#</td>
<td>#ItemMat_RuleVal#</td>
<td><input type="Text" name="Qty" size="10"></td>
<td width="10">#ItemMat_Charge#</td>
<td><input type="Checkbox" name="Chk1"></td>
</tr>
</cfoutput>
<tr>
<td width="300"><input type="Text" name="ItemDesc" size="50"></td>
<td><input type="Text" name="Rule" size="8"></td>
<td><input type="Text" name="Qty" size="10"></td>
<td width="10"><input type="Text" name="Chge" size="10"></td>
<td><input type="Checkbox" name="Chk1"></td>
</tr>
</table>
</form>
any help will be gratefully recieved
Liz