POST data to a new page

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • William E Hatto

    POST data to a new page

    Hi all,

    Sorry if this sounds a little ambiguous, but....

    I have a page with 4 submit buttons. How can I make 1 of these buttons spawn
    a new page AND use the data posted from the orginal page?

    Can this be down. I know I could do it with a querystring but I perfer not
    too.

    Cheers, Bill.


  • Bob Barrows [MVP]

    #2
    Re: POST data to a new page

    William E Hatto wrote:[color=blue]
    > Hi all,
    >
    > Sorry if this sounds a little ambiguous, but....
    >
    > I have a page with 4 submit buttons. How can I make 1 of these
    > buttons spawn a new page AND use the data posted from the orginal
    > page?
    >
    > Can this be down. I know I could do it with a querystring but I
    > perfer not too.
    >
    > Cheers, Bill.[/color]

    Set the target attribute of the form element to "_blank".

    Bob Barrows.

    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.


    Comment

    • William E Hatto

      #3
      Re: POST data to a new page

      Thanks Bob,

      I only want one of the submit buttons to lauch a new window though.

      Any ideas.

      Thanks Bill.



      "Bob Barrows [MVP]" <reb01501@NOyah oo.SPAMcom> wrote in message
      news:OAVqHpYQEH A.2876@TK2MSFTN GP09.phx.gbl...[color=blue]
      > William E Hatto wrote:[color=green]
      > > Hi all,
      > >
      > > Sorry if this sounds a little ambiguous, but....
      > >
      > > I have a page with 4 submit buttons. How can I make 1 of these
      > > buttons spawn a new page AND use the data posted from the orginal
      > > page?
      > >
      > > Can this be down. I know I could do it with a querystring but I
      > > perfer not too.
      > >
      > > Cheers, Bill.[/color]
      >
      > Set the target attribute of the form element to "_blank".
      >
      > Bob Barrows.
      >
      > --
      > Microsoft MVP -- ASP/ASP.NET
      > Please reply to the newsgroup. The email account listed in my From
      > header is my spam trap, so I don't check it very often. You will get a
      > quicker response by posting to the newsgroup.
      >
      >[/color]


      Comment

      • Bob Barrows [MVP]

        #4
        Re: POST data to a new page

        The target attribute can be changed dynamically using client-side code.
        Please go to a dhtml or scripting group for future help with this.

        I would change the INPUT from a Submit to a Button, and use this in the
        onclick event:

        var oForm =document.getEl ementByID("form _id")
        oForm.target="_ blank"
        oForm.submit()

        HTH,
        Bob Barrows

        William E Hatto wrote:[color=blue]
        > Thanks Bob,
        >
        > I only want one of the submit buttons to lauch a new window though.
        >
        > Any ideas.
        >
        > Thanks Bill.
        >
        >
        >
        > "Bob Barrows [MVP]" <reb01501@NOyah oo.SPAMcom> wrote in message
        > news:OAVqHpYQEH A.2876@TK2MSFTN GP09.phx.gbl...[color=green]
        >> William E Hatto wrote:[color=darkred]
        >>> Hi all,
        >>>
        >>> Sorry if this sounds a little ambiguous, but....
        >>>
        >>> I have a page with 4 submit buttons. How can I make 1 of these
        >>> buttons spawn a new page AND use the data posted from the orginal
        >>> page?
        >>>
        >>> Can this be down. I know I could do it with a querystring but I
        >>> perfer not too.
        >>>
        >>> Cheers, Bill.[/color]
        >>
        >> Set the target attribute of the form element to "_blank".
        >>
        >> Bob Barrows.
        >>
        >> --
        >> Microsoft MVP -- ASP/ASP.NET
        >> Please reply to the newsgroup. The email account listed in my From
        >> header is my spam trap, so I don't check it very often. You will get
        >> a quicker response by posting to the newsgroup.[/color][/color]

        --
        Microsoft MVP -- ASP/ASP.NET
        Please reply to the newsgroup. The email account listed in my From
        header is my spam trap, so I don't check it very often. You will get a
        quicker response by posting to the newsgroup.


        Comment

        • William E Hatto

          #5
          Re: POST data to a new page

          Thanks Bob :-)


          "Bob Barrows [MVP]" <reb01501@NOyah oo.SPAMcom> wrote in message
          news:%23H$eTTZQ EHA.2248@TK2MSF TNGP12.phx.gbl. ..[color=blue]
          > The target attribute can be changed dynamically using client-side code.
          > Please go to a dhtml or scripting group for future help with this.
          >
          > I would change the INPUT from a Submit to a Button, and use this in the
          > onclick event:
          >
          > var oForm =document.getEl ementByID("form _id")
          > oForm.target="_ blank"
          > oForm.submit()
          >
          > HTH,
          > Bob Barrows
          >
          > William E Hatto wrote:[color=green]
          > > Thanks Bob,
          > >
          > > I only want one of the submit buttons to lauch a new window though.
          > >
          > > Any ideas.
          > >
          > > Thanks Bill.
          > >
          > >
          > >
          > > "Bob Barrows [MVP]" <reb01501@NOyah oo.SPAMcom> wrote in message
          > > news:OAVqHpYQEH A.2876@TK2MSFTN GP09.phx.gbl...[color=darkred]
          > >> William E Hatto wrote:
          > >>> Hi all,
          > >>>
          > >>> Sorry if this sounds a little ambiguous, but....
          > >>>
          > >>> I have a page with 4 submit buttons. How can I make 1 of these
          > >>> buttons spawn a new page AND use the data posted from the orginal
          > >>> page?
          > >>>
          > >>> Can this be down. I know I could do it with a querystring but I
          > >>> perfer not too.
          > >>>
          > >>> Cheers, Bill.
          > >>
          > >> Set the target attribute of the form element to "_blank".
          > >>
          > >> Bob Barrows.
          > >>
          > >> --
          > >> Microsoft MVP -- ASP/ASP.NET
          > >> Please reply to the newsgroup. The email account listed in my From
          > >> header is my spam trap, so I don't check it very often. You will get
          > >> a quicker response by posting to the newsgroup.[/color][/color]
          >
          > --
          > Microsoft MVP -- ASP/ASP.NET
          > Please reply to the newsgroup. The email account listed in my From
          > header is my spam trap, so I don't check it very often. You will get a
          > quicker response by posting to the newsgroup.
          >
          >[/color]


          Comment

          • Dave Anderson

            #6
            Re: POST data to a new page

            Bob Barrows [MVP] wrote:[color=blue]
            > The target attribute can be changed dynamically using client-side
            > code. Please go to a dhtml or scripting group for future help with
            > this.
            >
            > I would change the INPUT from a Submit to a Button, and use this in
            > the onclick event:
            >
            > var oForm =document.getEl ementByID("form _id")
            > oForm.target="_ blank"
            > oForm.submit()[/color]

            Don't forget to reset the target afterward, or all buttons will adopt the
            "new window" behavior. For example:

            oForm.target = "_blank"
            oForm.submit()
            oForm.target = self



            --
            Dave Anderson

            Unsolicited commercial email will be read at a cost of $500 per message. Use
            of this email address implies consent to these terms. Please do not contact
            me directly or ask me to contact you directly for assistance. If your
            question is worth asking, it's worth posting.


            Comment

            • Bob Barrows [MVP]

              #7
              Re: POST data to a new page

              Dave Anderson wrote:
              [color=blue]
              > Don't forget to reset the target afterward, or all buttons will adopt
              > the "new window" behavior. For example:
              >[/color]

              :-)
              I left that as an exercise for the reader.

              Bob

              --
              Microsoft MVP -- ASP/ASP.NET
              Please reply to the newsgroup. The email account listed in my From
              header is my spam trap, so I don't check it very often. You will get a
              quicker response by posting to the newsgroup.


              Comment

              Working...