I have a form that collects the personal info then it loops through items so the user can add a row of addition items. Upon submitting my form,the personal data is inserted into a mySQL table, it then inserts the items into the items table by a cfloop. It works great but my clients now wants me to incorporate a popup window upon submitting the form. The popup will ask if they "Are sure your order is complete." If yes, then the form is submitted. How can I get the popup window to send the data to the appropriate tables?
Below is the cfloop I am using:
<cfloop from="1" to="#getnumba#" index="idx">
<!--- At first, it displays the original one row form --->
<!--- User enters the data and hits "Add Another" --->
<!--- The page reloads with the data already entered and creates a new blank row that is ready for data entry --->
<tr>
<cfif isdefined ("form.qty#idx#")>
<Td align="center"><cfcfinput type="text" name="qty#idx#" value="#form["qty" & idx]#" size="10" class="right"></TD>
<cfelse>
<Td align="center"><cfcfinput type="text" name="qty#idx#" size="10" class="right"></TD>
</cfif>
<cfif isdefined ("form.item#idx#")>
<Td align="center"><cfcfinput type="text" name="item#idx#" value="#form["item" & idx]#" size="40" class="right"></TD>
<cfelse>
<Td align="center"><cfcfinput type="text" name="item#idx#" size="40" class="right"></TD>
</cfif>
<cfif isdefined ("form.unit#idx#")>
<Td align="center"><cfcfinput type="text" name="unit#idx#" value="#form["unit" & idx]#" size="10" class="right"></TD>
<cfelse>
<Td align="center"><cfcfinput type="text" name="unit#idx#" size="10" class="right"></TD>
</cfif>
<cfif isdefined ("form.total#idx#")>
<Td align="center"><cfcfinput type="text" name="total#idx#" value="#form["total" & idx]#" size="10" class="right"></TD>
<cfelse>
<Td align="center"><cfcfinput type="text" name="total#idx#" size="10" class="right"></TD>
</cfif>
<td align="center"><cfinput type="button" name="add" value="Add Another Item" onClick="javascript:getnutherline();"></td>
</tr>
</cfloop>