Geeks Talk

Prepare for your Next Interview




Is it possible?

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 ...


Go Back   Geeks Talk > Web Development > HTML & CSS

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 05-21-2007
Contributing Member
 
Join Date: Sep 2006
Location: bangalore, india
Posts: 1,007
Thanks: 0
Thanked 76 Times in 64 Posts
psuresh1982 will become famous soon enough
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
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 05-22-2007
Expert Member
 
Join Date: Nov 2006
Location: Hyd-IND
Posts: 512
Thanks: 1
Thanked 53 Times in 45 Posts
sutnarcha is on a distinguished road
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-
Reply With Quote
  #3 (permalink)  
Old 05-23-2007
Contributing Member
 
Join Date: Sep 2006
Location: bangalore, india
Posts: 1,007
Thanks: 0
Thanked 76 Times in 64 Posts
psuresh1982 will become famous soon enough
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
Reply With Quote
Reply

  Geeks Talk > Web Development > HTML & CSS


Thread Tools
Display Modes



All times are GMT -4. The time now is 05:03 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved