Server-side enumeration of form object names and values?

M

MyndPhlyp

Is there a way (and can you give me a very brief example or point me to one)
to go through all the form objects sent by a PUT to determine what the form
object names were and the values sent?

I need to do this with VBScript on a "classic" ASP application.

Request.Form doesn't seem to do it. While I can tell how many objects were
sent (Request.Form.Count) and what the value of each object is
(Request.Form(I).Item or simply Request.Form(I)) to some degree, I can't
seem to nail down the object name.

Also, I noticed that a <button> field with an embedded <img> returns the
image when queried by Request.Form(I).Item.

Any help here would be appreciated. Just a shove in the right direction
would do the trick, I think.
 
M

MyndPhlyp

Steven Burn said:

Thanks, but I don't see the answer. The REQUEST_METHOD is only going to tell
me if the method is POST or GET and the rest of the page goes on to
illustrate why one should use Request.Form() rather than a simple Request().

My problem is that the form is built on-the-fly (based on records found in a
database) with an unknown number of objects. The data set is not huge. No
anchors; just a couple of <button>'s on each row.
 
B

Bob Lehmann

For Each i In Request.Form
Response.Write i & " = " & Request.Form(i) & "<br>"
Next

Bob Lehmann
 
M

MyndPhlyp

Bob Lehmann said:
For Each i In Request.Form
Response.Write i & " = " & Request.Form(i) & "<br>"
Next

Doh!

[Fear not. That repetitive thumping sound you hear is only my head beating
against the desk.]

I just can't seem to remember FOR EACH.

Now, if I can just get around this last wrinkle I'm all set. <button
type="submit"> wants to return only what is between the tags (an <img> in
this case) and the form always returns all <button> <img>'s (plus the value
of a traditional <input type="submit"> if it was the vehicle used). Using an
<input type="image"> is out of the question as it returns the coordinates
within the image clicked. Using a traditional <input type="submit"> is what
I'm trying to avoid.

I just want a pretty graphic to act as a form button that will pass a value
other than coordinates or the image contained within the tags when it is
clicked and I don't want to resort to client-side scripting.

[More beating of the head against the desk.]

I picked the wrong month to give up drinking.
 

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
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top