• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cancel Button

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am designing a HTML page with 2 buttons Submit & Cancel.
For Submit button I am writing a Servlet.How to handle the
Cancel button??I am new to Servlets & need help as early as
possible as I don't have time.Thanx in advance
 
maha anna
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It depends on how do you define your 'Cancel' Button's function? Does Cancel mean clear the page or go back to previous page or go to another page depending upon your business need.
Both buttons (Submit and Cancel) can be of TYPE=SUBMIT and they can have values as 'Submit' and 'Cancel' and same name as 'RequestType' like this.
Note that, the above code is generated html form one of the jsp pages of a web appln. I don't hard-code the 'http://localhost:8080' part It is generated from a jsp page with a init parameter. This is just an add-on info. Don't worry about this part.
When you press one of these two , your servlet may be called. In the Servlet Code you can do this.
regds
maha anna
[This message has been edited by maha anna (edited November 26, 2000).]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic