Recording dynamic data

T

TLowe

I have a series of elements (textbox, checkbox, radio,etc) that are named
dynamically in a for loop. The number of elements on the page is set by the
user and is variable. There can be one or many. I would like to use the
data from the elements (name, choice etc) to update the database with the
choice made at the client. The Checkbox values are also dynamically set
from a database. That is the reason for the second recordset. All
elements are sent to the client and the client makes their choices and what
I would like to do is take those choices and update the database. What is
the best way to work thru those elements and record the data?

Each case has all of the HTML code etc to write properly to the client page.
I left it out to make it more readable.
The end of each element has another radio button for a choice to include
that choice in a monthly report. This also is written to the database
as a part of the record for that question number which is (name(4,i).

I thought I knew how to get these but I have proved myself wrong! time and
time again.

Thanks
TLowe

for x = 0 to stopcounter

Select Case (question type)
Case 1 type 1
'response.write "<input type=CHECKBOX value=""" & recordset2("description")&
""" NAME=""" & name(4,i) & """>"

Case 2 type 2
response.write "<TD align=center WIDTH=50% ><INPUT TYPE=RADIO NAME=""" &
name(4,i) & """ & VALUE=yes /></TD> "
response.write "<TD align=center WIDTH=50% ><INPUT TYPE=RADIO NAME=""" &
name(4,i) & """ & VALUE=no /></TD> "

Case 3 type 3
response.write "<TEXTAREA NAME=name(4,i) ROWS=5 cols=80
wrap=soft></TEXTAREA> </SPAN> "

end case

response.write "<TD align=left vAlign=top WIDTH=100% >Include in Revenue
Report</TD> "
response.write "<INPUT TYPE=RADIO NAME=Include in Revenue Report &
VALUE==""" & name(4,i) & """ /></TD> "

next
 
T

TLowe

It seems that I have it working properly. I started to get it working by
going thru the each item in form.request. This didnt seem to work when the
data that I have as the name was of type ints. When I changed the data to
type char it seemed to work with no problem. I dont think that should be
correct but I will need to look into that later. I dont know if that is
something that is configurable with IIS 6 and Windows 2003. I wouldnt think
so but....
Thanks anyway!



I have a series of elements (textbox, checkbox, radio,etc) that are named
dynamically in a for loop. The number of elements on the page is set by the
user and is variable. There can be one or many. I would like to use the
data from the elements (name, choice etc) to update the database with the
choice made at the client. The Checkbox values are also dynamically set
from a database. That is the reason for the second recordset. All
elements are sent to the client and the client makes their choices and what
I would like to do is take those choices and update the database. What is
the best way to work thru those elements and record the data?

Each case has all of the HTML code etc to write properly to the client page.
I left it out to make it more readable.
The end of each element has another radio button for a choice to include
that choice in a monthly report. This also is written to the database
as a part of the record for that question number which is (name(4,i).

I thought I knew how to get these but I have proved myself wrong! time and
time again.

Thanks
TLowe

for x = 0 to stopcounter

Select Case (question type)
Case 1 type 1
'response.write "<input type=CHECKBOX value=""" & recordset2("description")&
""" NAME=""" & name(4,i) & """>"

Case 2 type 2
response.write "<TD align=center WIDTH=50% ><INPUT TYPE=RADIO NAME=""" &
name(4,i) & """ & VALUE=yes /></TD> "
response.write "<TD align=center WIDTH=50% ><INPUT TYPE=RADIO NAME=""" &
name(4,i) & """ & VALUE=no /></TD> "

Case 3 type 3
response.write "<TEXTAREA NAME=name(4,i) ROWS=5 cols=80
wrap=soft></TEXTAREA> </SPAN> "

end case

response.write "<TD align=left vAlign=top WIDTH=100% >Include in Revenue
Report</TD> "
response.write "<INPUT TYPE=RADIO NAME=Include in Revenue Report &
VALUE==""" & name(4,i) & """ /></TD> "

next
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,201
Latest member
KourtneyBe

Latest Threads

Top