Friday, February 23, 2024
 Popular · Latest · Hot · Upcoming
143
rated 0 times [  150] [ 7]  / answers: 1 / hits: 18704  / 13 Years ago, sat, march 12, 2011, 12:00:00

I have a form with few filed. Once i submit the form the data is stored in database and i will return to the same page.
Now, How to clear the fields in the form??



It is a struts based application. On submit it does some validations using java script then forwarded to the same page. Now, I must get a fresh page. I mean the fields must be cleared.


More From » java

 Answers
255

You can override Struts' Action reset() method and after you used it in your action you can do form.reset(request, response); and do a forward. That way, your form is resetted.


[#93318] Thursday, March 10, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
leiaf

Total Points: 10
Total Questions: 101
Total Answers: 84

Location: Guam
Member since Tue, Nov 29, 2022
1 Year ago
;