Not getting form values

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David C

    Not getting form values

    I have the following line of code in my asp page

    Dim ix
    For ix = 1 to Request.Form.Co unt
    fieldName = Request.Form.Ke y(ix)
    fieldValue = Request.Form.It em(ix)
    Response.Write fieldName
    Response.Write fieldValue &
    Next
    Response.End

    It is not returning the results of any field on the previous form page.
    Does anyone know what I might look for? Thanks.

    David


  • Curt_C [MVP]

    #2
    Re: Not getting form values

    Instead look at

    for each item in Request.Form
    Response.Write item & "-" & Request.Form(it em) & "<br>"
    next


    Curt

    "David C" <dlchase@lifeti meinc.com> wrote in message
    news:%23qzF%23T uhEHA.3980@TK2M SFTNGP12.phx.gb l...[color=blue]
    >I have the following line of code in my asp page
    >
    > Dim ix
    > For ix = 1 to Request.Form.Co unt
    > fieldName = Request.Form.Ke y(ix)
    > fieldValue = Request.Form.It em(ix)
    > Response.Write fieldName
    > Response.Write fieldValue &
    > Next
    > Response.End
    >
    > It is not returning the results of any field on the previous form page.
    > Does anyone know what I might look for? Thanks.
    >
    > David
    >
    >[/color]


    Comment

    • Bob Lehmann

      #3
      Re: Not getting form values


      fieldName = ix
      fieldValue = Request.Form(ix )

      Bob Lehmann

      "David C" <dlchase@lifeti meinc.com> wrote in message
      news:#qzF#TuhEH A.3980@TK2MSFTN GP12.phx.gbl...[color=blue]
      > I have the following line of code in my asp page
      >
      > Dim ix
      > For ix = 1 to Request.Form.Co unt
      > fieldName = Request.Form.Ke y(ix)
      > fieldValue = Request.Form.It em(ix)
      > Response.Write fieldName
      > Response.Write fieldValue &
      > Next
      > Response.End
      >
      > It is not returning the results of any field on the previous form page.
      > Does anyone know what I might look for? Thanks.
      >
      > David
      >
      >[/color]


      Comment

      • David

        #4
        Re: Not getting form values

        Still nothing. Is there maybe a problem because I have 2 <SPAM>
        sections inside of the form?

        David



        *** Sent via Developersdex http://www.developersdex.com ***
        Don't just participate in USENET...get rewarded for it!

        Comment

        • Curt_C [MVP]

          #5
          Re: Not getting form values

          ? <spam> or <span> ?
          That shouldnt' matter anyway. I'd suggest hitting up a clientside group
          though, this isn't an ASP issue, it's a javascript one.

          Curt

          "David" <daman@biteme.c om> wrote in message
          news:Ou$Z52uhEH A.1568@TK2MSFTN GP09.phx.gbl...[color=blue]
          > Still nothing. Is there maybe a problem because I have 2 <SPAM>
          > sections inside of the form?
          >
          > David
          >
          >
          >
          > *** Sent via Developersdex http://www.developersdex.com ***
          > Don't just participate in USENET...get rewarded for it![/color]


          Comment

          • David

            #6
            Re: Not getting form values

            Still not getting anything back. The only thing I see in this form that
            is not in another form that does return values are 2 SPAN sections. Any
            idea why nothing comes back on Request.form items?

            David



            *** Sent via Developersdex http://www.developersdex.com ***
            Don't just participate in USENET...get rewarded for it!

            Comment

            • David

              #7
              Re: Not getting form values

              Still getting nothing. Do you know of anything that would keep me from
              getting results in Request.Form ?

              David



              *** Sent via Developersdex http://www.developersdex.com ***
              Don't just participate in USENET...get rewarded for it!

              Comment

              • Bob Barrows [MVP]

                #8
                Re: Not getting form values

                David C wrote:[color=blue]
                > I have the following line of code in my asp page
                >
                > Dim ix
                > For ix = 1 to Request.Form.Co unt
                > fieldName = Request.Form.Ke y(ix)
                > fieldValue = Request.Form.It em(ix)
                > Response.Write fieldName
                > Response.Write fieldValue &
                > Next
                > Response.End
                >
                > It is not returning the results of any field on the previous form
                > page. Does anyone know what I might look for? Thanks.
                >
                > David[/color]

                Back to basics:
                Show us a small portion of the form you are submitting that reproduces the
                problem. Cut it down to the smallest size possible that still reproduces the
                problem (we're not going to slog through 1000 lines of html to find the
                <form> element - at least, I'm not)

                Bob Barrows
                --
                Microsoft MVP - ASP/ASP.NET
                Please reply to the newsgroup. This email account is my spam trap so I
                don't check it very often. If you must reply off-line, then remove the
                "NO SPAM"


                Comment

                • Ray at

                  #9
                  Re: Not getting form values

                  Are you using method=POST for your form? ___POST___



                  Ray at work


                  "David" <daman@biteme.c om> wrote in message
                  news:OQbSRpvhEH A.1048@tk2msftn gp13.phx.gbl...[color=blue]
                  > Still getting nothing. Do you know of anything that would keep me from
                  > getting results in Request.Form ?
                  >
                  > David
                  >
                  >
                  >
                  > *** Sent via Developersdex http://www.developersdex.com ***
                  > Don't just participate in USENET...get rewarded for it![/color]


                  Comment

                  • David

                    #10
                    Re: Not getting form values

                    Yes, I am using method=POST



                    *** Sent via Developersdex http://www.developersdex.com ***
                    Don't just participate in USENET...get rewarded for it!

                    Comment

                    • David

                      #11
                      Re: Not getting form values

                      What it turned out to be is that I was going to the new page from a
                      hyperlink and when you do that, there are no form variables passed. I
                      changed it to run a javascript function and passed it the url info and
                      that function submit() ed the form.

                      Thanks all.

                      David



                      *** Sent via Developersdex http://www.developersdex.com ***
                      Don't just participate in USENET...get rewarded for it!

                      Comment

                      Working...