lenin
Jul 2nd, 2000, 11:00 AM
Hi,
some time back I send the following in:
-----------------------------------------------------------
Hi,
Is anyone aware of how to request the name of each object on a HTML form?
I am dynamically creating textboxes based on the name of a field returned from an SQL query, however, when I try to access the contents of the text boxes with the name I think I gave them, it returns nothing despite the fact they are populated. Code to create the text boxes, with values below.
dim num
num = 1
do while not records.eof
for each fld in records.fields
response.write "<TD align='center' >"
if fld.name = "quantity" then
response.write "<input type = 'text' size='5' name='quantity" & num & "' value = " & fld.value & ">"
num = num + 1
else
response.write "<font face='Arial'>" & fld.value & "</font>"
end if
response.write "</TD>"
next
total = total + records("Total")
response.write "<tr>"
records.movenext
loop
Any help appreciated.
Lenin
-----------------------------------------------------------
What I don't understand is this:
I have a button:
if Request("Update_Values") = "Update Basket Details" Then
for i = 1 to num - 1
x = Request.Form("quantity" & i)
response.write "X is :" & x
next
end if
which when pressed I want to write the contents of the dynamically created text boxes to the brwser. However this displays no values!
Can someone point me in the right direction. I really can't see a lot wrong with this.
Thnaks in advance.
Lenin
some time back I send the following in:
-----------------------------------------------------------
Hi,
Is anyone aware of how to request the name of each object on a HTML form?
I am dynamically creating textboxes based on the name of a field returned from an SQL query, however, when I try to access the contents of the text boxes with the name I think I gave them, it returns nothing despite the fact they are populated. Code to create the text boxes, with values below.
dim num
num = 1
do while not records.eof
for each fld in records.fields
response.write "<TD align='center' >"
if fld.name = "quantity" then
response.write "<input type = 'text' size='5' name='quantity" & num & "' value = " & fld.value & ">"
num = num + 1
else
response.write "<font face='Arial'>" & fld.value & "</font>"
end if
response.write "</TD>"
next
total = total + records("Total")
response.write "<tr>"
records.movenext
loop
Any help appreciated.
Lenin
-----------------------------------------------------------
What I don't understand is this:
I have a button:
if Request("Update_Values") = "Update Basket Details" Then
for i = 1 to num - 1
x = Request.Form("quantity" & i)
response.write "X is :" & x
next
end if
which when pressed I want to write the contents of the dynamically created text boxes to the brwser. However this displays no values!
Can someone point me in the right direction. I really can't see a lot wrong with this.
Thnaks in advance.
Lenin