Is there a way within my ASP code to append a variable to the name of an
input field? I am building a table on the fly depending on what products
are being selected from a dropdown box. The code for the table I am
working with is as follows (THANKS IN ADVANCE FOR ANY HELP!!):
'***** SP to build the product by Apologetic products table. *****
strSQLStatement = "Get_Apologetics_Products_By_Customer " & intCustomer_id
Set rs = XLMconn.Execute(strSQLStatement)
'***** Setup the variable to ensure empty before populating. *****
strcustApologetic = ""
'***** Build the Apologetic products table associated with this customer
and where user can add or delete product. *****
If Not rs.EOF Then
strApologetic_table = "<TABLE width='575' align='left' border='1' cellpadding='2'
cellspacing='0'>"
strApologetic_table = strApologetic_table & "<tr>" & vbCRLF
strApologetic_table = strApologetic_table & "<th><font face='arial' size='2'>Remove
Product</font></th>" & vbCRLF
strApologetic_table = strApologetic_table & "<th><font face='arial'
size='2'>Product:</font></th>" & vbCRLF
strApologetic_table = strApologetic_table & "<th><font face='arial'
size='2'>Qty.:</font></th>" & vbCRLF
strApologetic_table = strApologetic_table & "<th><font face='arial' size='2'>Suggested
Donation Amt.:</font></th>" &
vbCRLF
strApologetic_table = strApologetic_table & "<th><font face='arial' size='2'>Check To
Donate</font></th>" & vbCRLF
strApologetic_table = strApologetic_table & "<th><font face='arial' size='2'>Your
Donation Amt.:</font></th>" & vbCRLF
strApologetic_table = strApologetic_table & "</tr>" & vbCRLF
'***** Start loop for all products associated with the customer_id. *****
Do While Not rs.EOF
strApologetic_table = strApologetic_table & "<tr>" & vbCRLF
strApologetic_table = strApologetic_table & "<td align='center' valign='middle'><input
type='checkbox' name='delete_checked_product' value='" & rs("product_id") & "'></td>"
& vbCRLF
strApologetic_table = strApologetic_table & "<td align='left' valign='middle'><font
face='arial' size='2'>" &
trim(rs("product_description")) & "</font></td>" & vbCRLF
strApologetic_table = strApologetic_table & "<td align='center' valign='middle'><input
type='text' name='product_qty' value='1' size='5'></td>" & vbCRLF
strApologetic_table = strApologetic_table & "<td align='right' valign='middle'><font
face='arial' size='2'>" &
rs("product_donation_amt") & "</font></td>" & vbCRLF
strApologetic_table = strApologetic_table & "<td align='center' valign='middle'><input
type='checkbox' name='donate_checked_product' value='" & rs("product_id") & "'></td>"
& vbCRLF
strApologetic_table = strApologetic_table & "<td align='right' valign='middle'><input
type='text' name='your_product_donation_amt' size='10'></td>" & vbCRLF
strApologetic_table = strApologetic_table & "</tr>" & vbCRLF
'***** Set variable to a comma delimited string for using in the updated
stored procedure above. *****
strcustApologetic = strcustApologetic & rs("customer_id") & ", "
iCounter = iCounter + 1
rs.MoveNext
Loop
strApologetic_table = strApologetic_table & "</table>" & vbCRLF
'***** Remove the comma at the end of the last record. *****
strcustApologetic = left(strcustApologetic, len(strcustApologetic) - 2) &
" "
End If
rs.Close
---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]