Prepare for your Next Interview
This is a discussion on Is it possible? within the HTML & CSS forums, part of the Web Development category; 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 ...
|
|||
|
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 |
| Sponsored Links |
|
|||
|
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- |
|
|||
|
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 |