Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Mar 2006
    Location
    Sumter, SC
    Posts
    178
    Thanks
    10
    Thanked 4 Times in 4 Posts

    Request.Form Question

    I'm having a litte trouble with a dynamicly built form when it comes to requesting the information contained in it from another page. Seeing as I dont necessarily know what the form elements will be called, how can I request them from another page??

    Trying Request.Form(rs("Item") generates the error "The function expects a string as input."

  • #2
    Regular Coder
    Join Date
    Sep 2007
    Posts
    120
    Thanks
    0
    Thanked 3 Times in 3 Posts
    For Each fld In Request.Form
    response.write fld & ": " & Request.Form(fld) & "<br>"
    Next


    HTH, Tom

  • #3
    Regular Coder
    Join Date
    Mar 2006
    Location
    Sumter, SC
    Posts
    178
    Thanks
    10
    Thanked 4 Times in 4 Posts
    Thanks, but there are a few fields on the form that I dont need to gather from. theres some hidden fields being used to calculate cost when quantity is input, I only need to gather the quantity fields and not the cost fields.

    Any way to tell it to ignore the type="hidden" form elements?

  • #4
    Regular Coder
    Join Date
    Sep 2007
    Posts
    120
    Thanks
    0
    Thanked 3 Times in 3 Posts
    Prefix the hidden fields with 'hidden' and thr this:

    For Each fld In Request.Form
    If Instr(fld, "hidden") = 0 Then
    response.write fld & ": " & Request.Form(fld) & "<br>"
    End if
    Next

    Tom

  • Users who have thanked Whatever Jr. for this post:

    DakotaChick (11-23-2007)

  • #5
    Regular Coder
    Join Date
    Nov 2007
    Posts
    110
    Thanks
    0
    Thanked 1 Time in 1 Post
    if the object is not exist it will show error, simple methord to avoid error use on error resu me next


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •