Your code creates multiple text boxes with the exact same name, which makes it impossible to identify which is which. What you need to do is vary the name in a way that identifies the record. I usually add the unique id of the record that each field refers to. for example, if the unique id in your cart table is ItemId, you could re-write your code as follows:
This would create fields with names like cquant_1529, cquant_1632, etc. The receiving code could then use the Request.FormArray method to retrieve all form fields, look through the array for fields, whose names start with the text "cquant_" and identify the corresponding records by extracting the text after the "_" character.
By the way, there may be a reason why you are doing this, but it seems to me that a SCAN loop would be cleaner and faster than a FOR loop in conjunction with the GO statement:
Sent by Joe Goldsmiith on 11/27/2007 05:02:24 PM:
Hi all. I have a working shopping cart that I just found out that it does not work well with Safari. I found the offending code and concluded that, based on the totality of the script, needs to be rewritten.
Currently, the script reads in all the chosen products and the quantity desired. The quantity is just written to the screen and an up arrow and a down arrow allows the user to change the amount. Safari hates this.
I decided to rebuild a script with HTML input boxes but quickly realized that when the update button is pressed that I do not know (cannot tell) which product to update quantity. In the bit picture:
So, if the customer updates the second of three quantities then how do I know which quantity to update when the Update button is pressed?
Thanks for your help.