ASP Woes

T

Tommyj

Hi all,

Ok, any help on this would be great, or a pointer in the right
direction if not!

I have a form thats generated on the fly from an Access DB, there's a
number of tick boxes on it, but, the amount of tick boxes differ
dependent on the recordset retrieved. This is working fine, but I'm
wanting to post the form to a handler to send a confirmation email and
then enter it into a DB.

Whats the best way to retrieve these form fields on the handler page,
as I do not know how many tick boses there will be and what the VALUE
will be.

Hope this makes sense, any suggestions would be great!

Tom
 
R

Ray at

What is a tick box?

If you're naming these elements with consistency, like:

<%
do while not rs.eof
%>
<input name="tick<%=rs.fields.item(0).value%>" type="tick box"
value="<%=rs.fields.item(1).value%>">
<%
rs.movenext
loop
%>

You could do something like:

<%
For each thing in Request.Form
If Left(thing & "xxxx", 4) = "tick" Then
'''your code here
End If
Next
%>

Another option is to have a hidden input that contains the IDs or names of
all these "tick boxes" in a comma delimited format, and then split that
value in your server-side code that processes the form.

Ray at work
 

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

Forum statistics

Threads
474,145
Messages
2,570,826
Members
47,371
Latest member
Brkaa

Latest Threads

Top