Request object

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • BJ Freeman

    Request object

    I have passed a form with a post.
    the form is generated from a dB and can change.
    the page that accepts the post must get the input name and value from the form passed to it.

    Request.Form(I) (1) give me the value, but I can not retrieve the name.

    I know it is something simple. but cannot seem to get to work.



  • BJ Freeman

    #2
    Re: Request object

    here is the compete line
    <input name="<%= trim(Request.Fo rm(I)(1))%>" type="hidden" value="<%= trim(Request.Fo rm(I)(2))%>">

    "BJ Freeman" <bj_newsgroups@ free-man.net> wrote in message news:Tzzcc.9$fE 1.18316@news.us west.net...
    I have passed a form with a post.
    the form is generated from a dB and can change.
    the page that accepts the post must get the input name and value from the form passed to it.

    Request.Form(I) (1) give me the value, but I can not retrieve the name.

    I know it is something simple. but cannot seem to get to work.



    Comment

    • ZER0

      #3
      [OT] Re: Request object (was: Request object)

      On Tue, 6 Apr 2004 08:04:31 -0700, BJ Freeman wrote:
      [color=blue]
      > here is the compete line
      > <input name="<%= trim(Request.Fo rm(I)(1))%>" type="hidden" value="<%= trim(Request.Fo rm(I)(2))%>">[/color]

      Mhm.. this seems ASP/VBS not ASP/JScript.. in that case, you're OT.

      Anyway, Form is a Collection of Request Object, so you can use the Key for
      obtain the name of a element.

      For Example:

      Request.Form.Ke y(1)

      --
      C'ya,
      ZER0 :: coder.gfxer.web Designer();

      Non esistono donne brutte. Dipende solo da quanta vodka bevi.
      (proverbio russo)

      Comment

      • Richard Cornford

        #4
        Re: [OT] Re: Request object (was: Request object)

        ZER0 wrote:
        <snip>[color=blue]
        > Mhm.. this seems ASP/VBS not ASP/JScript.. in that case, you're OT.[/color]
        <snip>

        Rubbish, JScript is an ECMAScript implementation and so completely on
        topic for this group.

        Richard.


        Comment

        • Evertjan.

          #5
          Re: Request object

          BJ Freeman wrote on 06 apr 2004 in comp.lang.javas cript:[color=blue]
          > I have passed a form with a post.
          > the form is generated from a dB and can change.
          > the page that accepts the post must get the input name and value from
          > the form passed to it.
          >
          > Request.Form(I) (1) give me the value, but I can not retrieve the name.
          >
          > I know it is something simple. but cannot seem to get to work.
          >[/color]

          [please do not use html on usenet]

          Serverside ASP scripting:

          <%
          result = request.form("i nputname")
          %>

          If this is in serverside javascript, "request.fo rm" is case sensitive

          --
          Evertjan.
          The Netherlands.
          (Please change the x'es to dots in my emailaddress)

          Comment

          • ZER0

            #6
            Re: [OT] Re: Request object

            On Tue, 6 Apr 2004 16:43:06 +0100, Richard Cornford wrote:
            [color=blue]
            > <snip>[color=green]
            >> Mhm.. this seems ASP/VBS not ASP/JScript.. in that case, you're OT.[/color]
            > <snip>
            >
            > Rubbish, JScript is an ECMAScript implementation and so completely on
            > topic for this group.[/color]

            Sorry for my english, maybe is not so clear.
            I mean: If you use ASP/VBS, you're Off Topic. Not with ASP/JScript.
            And your code *seems* VBS (for trim() use). Of course, trim could be a
            JScript custom function (but usually in JScript the way is add a trim()
            method to String object), this is the reason 'cause I wrote "seems VBS",
            and not "is VBS".

            --
            C'ya,
            ZER0 :: coder.gfxer.web Designer();

            Una mente perversa e' un peccato sprecarla.
            (A dirty mind is a terrible thing to waste)

            Comment

            • Richard Cornford

              #7
              Re: [OT] Re: Request object

              ZER0 wrote:[color=blue]
              > Richard Cornford wrote:[color=green]
              >> <snip>[color=darkred]
              >>> Mhm.. this seems ASP/VBS not ASP/JScript.. in that case, you're OT.
              >>> <snip>[/color]
              >>
              >> Rubbish, JScript is an ECMAScript implementation and so completely on
              >> topic for this group.[/color]
              >
              > Sorry for my english, maybe is not so clear.[/color]
              <snip>[color=blue]
              > .. this is the reason 'cause I wrote
              > "seems VBS", and not "is VBS".[/color]

              Fair enough, a misinterpretati on on my part, sorry. I haven't been
              reading the OP's actual posts because they are in - Content-Type:
              multipart/alternative; - instead of plain text (as is required).

              Richard.


              Comment

              • Brian Genisio

                #8
                Re: [OT] Re: Request object

                Richard Cornford wrote:
                [color=blue]
                > ZER0 wrote:
                > <snip>
                >[color=green]
                >>Mhm.. this seems ASP/VBS not ASP/JScript.. in that case, you're OT.[/color]
                >
                > <snip>
                >
                > Rubbish, JScript is an ECMAScript implementation and so completely on
                > topic for this group.
                >
                > Richard.
                >
                >[/color]

                No, I think ZERO is right. This is VBS code, not JScript code. In ASP,
                as far as I know, the following code is ASP:

                <% =Split("THIS IS A TEST")(0) %>

                where the following is JScript:

                <% ="THIS IS A TEST".split(" ")[0] %>

                The OP was using both the VBScript form of Split, and the VBScript form
                of array indexing. Unless I am missing your point, I believe this is OT.

                Brian

                Comment

                • Tim Slattery

                  #9
                  Re: [OT] Re: Request object (was: Request object)

                  "Richard Cornford" <Richard@litote s.demon.co.uk> wrote:
                  [color=blue]
                  >ZER0 wrote:
                  ><snip>[color=green]
                  >> Mhm.. this seems ASP/VBS not ASP/JScript.. in that case, you're OT.[/color]
                  ><snip>
                  >
                  >Rubbish, JScript is an ECMAScript implementation and so completely on
                  >topic for this group.[/color]

                  Yup, JScript is exactly that. But the text that OP submitted was
                  written in VBScript, not JScript, hence ZERO's comment.

                  --
                  Tim Slattery
                  Slattery_T@bls. gov

                  Comment

                  • BJ Freeman

                    #10
                    Re: Request object

                    my apologies for the non plain text. did not notice.
                    First this is java script.
                    trim is my function I use.
                    the request object, in javascript does nto support what I wanted to do.

                    so I improvice and parse the Request.Form() thru splits,

                    <%
                    var fromvars =new String(Request. Form());
                    var i=5;

                    var options = fromvars.split( "&" )
                    %>
                    <%for (var loop=i; loop < options.length; loop++)
                    {%>
                    <%var optionsparts =options[loop].split('=');%>
                    <input name="<%= trim(optionspar ts [0])%>" type="hidden" value="<%=
                    trim(optionspar ts [1])%>">
                    <%}%>


                    "BJ Freeman" <bj_newsgroups@ free-man.net> wrote in message
                    news:wGzcc.10$f E1.18987@news.u swest.net...
                    here is the compete line
                    <input name="<%= trim(Request.Fo rm(I)(1))%>" type="hidden" value="<%=
                    trim(Request.Fo rm(I)(2))%>">


                    "BJ Freeman" <bj_newsgroups@ free-man.net> wrote in message
                    news:Tzzcc.9$fE 1.18316@news.us west.net...
                    I have passed a form with a post.
                    the form is generated from a dB and can change.
                    the page that accepts the post must get the input name and value from the
                    form passed to it.

                    Request.Form(I) (1) give me the value, but I can not retrieve the name.
                    I know it is something simple. but cannot seem to get to work.


                    Comment

                    • BJ Freeman

                      #11
                      Re: [OT] Re: Request object (was: Request object)

                      Not sure how you evaluated that line of code to be VBA. It is JavaScript.


                      "ZER0" <zer0.shock@lib ero.it> wrote in message
                      news:ba9hyrb4ac yc.dlg@ID-171124.news.ind ividual.net...[color=blue]
                      > On Tue, 6 Apr 2004 08:04:31 -0700, BJ Freeman wrote:
                      >[color=green]
                      > > here is the compete line
                      > > <input name="<%= trim(Request.Fo rm(I)(1))%>" type="hidden" value="<%=[/color][/color]
                      trim(Request.Fo rm(I)(2))%>">[color=blue]
                      >
                      > Mhm.. this seems ASP/VBS not ASP/JScript.. in that case, you're OT.
                      >
                      > Anyway, Form is a Collection of Request Object, so you can use the Key for
                      > obtain the name of a element.
                      >
                      > For Example:
                      >
                      > Request.Form.Ke y(1)
                      >
                      > --
                      > C'ya,
                      > ZER0 :: coder.gfxer.web Designer();
                      >
                      > Non esistono donne brutte. Dipende solo da quanta vodka bevi.
                      > (proverbio russo)[/color]


                      Comment

                      • BJ Freeman

                        #12
                        Re: [OT] Re: Request object

                        Not sure where you got the split from. I did not show any code with split in
                        it in the first two messages.
                        I did use trim, however that is a JavaScript set of functions I use.

                        "Brian Genisio" <BrianGenisio@y ahoo.com> wrote in message
                        news:4072d9f0$1 @10.10.0.241...[color=blue]
                        > Richard Cornford wrote:
                        >[color=green]
                        > > ZER0 wrote:
                        > > <snip>
                        > >[color=darkred]
                        > >>Mhm.. this seems ASP/VBS not ASP/JScript.. in that case, you're OT.[/color]
                        > >
                        > > <snip>
                        > >
                        > > Rubbish, JScript is an ECMAScript implementation and so completely on
                        > > topic for this group.
                        > >
                        > > Richard.
                        > >
                        > >[/color]
                        >
                        > No, I think ZERO is right. This is VBS code, not JScript code. In ASP,
                        > as far as I know, the following code is ASP:
                        >
                        > <% =Split("THIS IS A TEST")(0) %>
                        >
                        > where the following is JScript:
                        >
                        > <% ="THIS IS A TEST".split(" ")[0] %>
                        >
                        > The OP was using both the VBScript form of Split, and the VBScript form
                        > of array indexing. Unless I am missing your point, I believe this is OT.
                        >
                        > Brian
                        >[/color]


                        Comment

                        • BJ Freeman

                          #13
                          Re: [OT] Re: Request object (was: Request object)

                          still have not figured out how you think that is vbs.



                          "Tim Slattery" <Slattery_T@bls .gov> wrote in message
                          news:8mn57052uc su401t7dap29gan 72gr86i3m@4ax.c om...[color=blue]
                          > "Richard Cornford" <Richard@litote s.demon.co.uk> wrote:
                          >[color=green]
                          > >ZER0 wrote:
                          > ><snip>[color=darkred]
                          > >> Mhm.. this seems ASP/VBS not ASP/JScript.. in that case, you're OT.[/color]
                          > ><snip>
                          > >
                          > >Rubbish, JScript is an ECMAScript implementation and so completely on
                          > >topic for this group.[/color]
                          >
                          > Yup, JScript is exactly that. But the text that OP submitted was
                          > written in VBScript, not JScript, hence ZERO's comment.
                          >
                          > --
                          > Tim Slattery
                          > Slattery_T@bls. gov[/color]


                          Comment

                          • ZER0

                            #14
                            Re: [OT] Re: Request object

                            On Tue, 6 Apr 2004 15:53:11 -0700, BJ Freeman wrote:
                            [color=blue]
                            > Not sure how you evaluated that line of code to be VBA. It is JavaScript.[/color]

                            VBA? Maybe you mean VBS..?

                            Anyway, I don't understand what you're talking about. Which code?

                            --
                            C'ya,
                            ZER0 :: coder.gfxer.web Designer();

                            "Lo dice il buon senso, ma il buon senso non e' uno standard".
                            (Jeffrey Zeldman)

                            Comment

                            • Brian Genisio

                              #15
                              Re: [OT] Re: Request object

                              BJ Freeman wrote:[color=blue]
                              > Not sure where you got the split from. I did not show any code with split in
                              > it in the first two messages.
                              > I did use trim, however that is a JavaScript set of functions I use.
                              >
                              > "Brian Genisio" <BrianGenisio@y ahoo.com> wrote in message
                              > news:4072d9f0$1 @10.10.0.241...
                              >[color=green]
                              >>Richard Cornford wrote:
                              >>
                              >>[color=darkred]
                              >>>ZER0 wrote:
                              >>><snip>
                              >>>
                              >>>>Mhm.. this seems ASP/VBS not ASP/JScript.. in that case, you're OT.
                              >>>
                              >>><snip>
                              >>>
                              >>>Rubbish, JScript is an ECMAScript implementation and so completely on
                              >>>topic for this group.
                              >>>
                              >>>Richard.
                              >>>
                              >>>[/color]
                              >>
                              >>No, I think ZERO is right. This is VBS code, not JScript code. In ASP,
                              >>as far as I know, the following code is ASP:
                              >>
                              >><% =Split("THIS IS A TEST")(0) %>
                              >>
                              >>where the following is JScript:
                              >>
                              >><% ="THIS IS A TEST".split(" ")[0] %>
                              >>
                              >>The OP was using both the VBScript form of Split, and the VBScript form
                              >>of array indexing. Unless I am missing your point, I believe this is OT.
                              >>
                              >>Brian
                              >>[/color]
                              >[/color]

                              *doat* You are right... I read it once, and did something else, and did
                              not re-read it. Sorry :)

                              Brian

                              Comment

                              Working...