Results 1 to 5 of 5

Thread: Is it possible?

  1. #1
    Contributing Member
    Join Date
    Sep 2006
    Answers
    962

    Is it possible?

    In a form i have two buttons. One is back and another one is next. I declare both of this "type=submit". But i need if i click "back" then it goes to previous page and if click "next" it goes to next page. Is it possible to acheice this using two submit buttons in a single form?

    ---------------------
    suresh


  2. #2
    Expert Member
    Join Date
    Nov 2006
    Answers
    518

    Re: Is it possible?

    I think it is possible.

    If you put 2 submit buttons, their will be only one function that is called when you click on either of them. Then, internally in the function, you will have to identify which submit button is clicked and separate the execution logic. You will have to work with some property of the button (may be ‘caption’) that is unique between the 2 submit buttons.

    Lack of WILL POWER has caused more failure than
    lack of INTELLIGENCE or ABILITY.

    -sutnarcha-

  3. #3
    Contributing Member
    Join Date
    Sep 2006
    Answers
    962

    Re: Is it possible?

    Hi sutnarcha,

    I know if i call the javascript function in the submit onclick event then we can acheive the result. But my question is without using any javascript function can i acheive the result ?

    -------------------
    suresh


  4. #4
    Junior Member
    Join Date
    Feb 2009
    Answers
    9

    Re: Is it possible?

    Its possible if you can store the click event values in hidden field. for eg.. if u click on next and it fetches a result and you ll ve to get the unique value in dat event and store it in hidden field and den if u click on previous button jus use dat hidden field value to get to the previous point.


  5. #5
    Junior Member
    Join Date
    May 2011
    Answers
    1

    Re: Is it possible?

    Off course, It is possible through java script.


  6.  Sponsored Ads
    Ad


     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact