• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HOW TO CLEAR FORM FIELDS AFTER SUBMITTING?

 
Rui Ferns
Greenhorn
Posts: 24
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
Can anyone tell me hoe to clear form fields after clicking on the submit button.
I have fields which contain sensitive info. When the submit button is clicked the data is sent to another JSP. But how can I clear these fields after submitting?
Thanks
Rui
 
Bosun Bello
Ranch Hand
Posts: 1510
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use a javascript function to loop through all the form fields in the onSubmit/onClick of the submit button. Have the function check for the type of form field and then set it to it's default value.

Bosun
 
maha anna
Ranch Hand
Posts: 1467
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OnSubmit of your Submit button call this Javascript fn
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic