Submit Button in JSP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • padmanabhanp
    New Member
    • Nov 2006
    • 14

    Submit Button in JSP

    Hai,
    Whether it is possible to use two submit buttons in same page(Jsp)

    Thanks in Advance
    P.Padmanabhan
  • PLA
    New Member
    • Aug 2006
    • 44

    #2
    Originally posted by padmanabhanp
    Hai,
    Whether it is possible to use two submit buttons in same page(Jsp)

    Thanks in Advance
    P.Padmanabhan
    You can use two submit button in the same page, if they are in the same form, they will do the same action (the action of the form) but you'll get in the Query string the name=value of the one clicked,
    or you put 2 forms on your page with 2 actions and 1 button submit in each.

    Comment

    • padmanabhanp
      New Member
      • Nov 2006
      • 14

      #3
      Hello,
      Thanks you Sir


      Originally posted by PLA
      You can use two submit button in the same page, if they are in the same form, they will do the same action (the action of the form) but you'll get in the Query string the name=value of the one clicked,
      or you put 2 forms on your page with 2 actions and 1 button submit in each.

      Comment

      • rajamanickavasagamm
        New Member
        • Dec 2006
        • 2

        #4
        Originally posted by padmanabhanp
        Hello,
        Thanks you Sir

        Hi,
        I have a similar situation. I have 2 forms in single jsp, trying to submit both the forms with single submit button. How to go about it..

        Any code snippets will be helpful.

        thanks,
        Raja

        Comment

        • r035198x
          MVP
          • Sep 2006
          • 13225

          #5
          Originally posted by rajamanickavasa gamm
          Hi,
          I have a similar situation. I have 2 forms in single jsp, trying to submit both the forms with single submit button. How to go about it..

          Any code snippets will be helpful.

          thanks,
          Raja
          [HTML]
          onClick = "javascript:doc ument.forms['formName'].submit()"
          [/HTML]

          Comment

          • rajamanickavasagamm
            New Member
            • Dec 2006
            • 2

            #6
            Originally posted by r035198x
            [HTML]
            onClick = "javascript:doc ument.forms['formName'].submit()"
            [/HTML]
            Thanks for your reply.
            But when i submit sequentially, the first form get submitted and as a result the page get refreshed and the second form is not submitted.

            thanks,
            Raja

            Comment

            • r035198x
              MVP
              • Sep 2006
              • 13225

              #7
              Originally posted by rajamanickavasa gamm
              Thanks for your reply.
              But when i submit sequentially, the first form get submitted and as a result the page get refreshed and the second form is not submitted.

              thanks,
              Raja
              Do you mean that you want 2 forms to be submitted at the same time to 2 different urls or both to be submitted at the same time to the same url

              Comment

              • r035198x
                MVP
                • Sep 2006
                • 13225

                #8
                Originally posted by r035198x
                Do you mean that you want 2 forms to be submitted at the same time to 2 different urls or both to be submitted at the same time to the same url
                Also if you can please post the code that you already have

                Comment

                Working...