Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

reset not firing 1

Status
Not open for further replies.

maxpower1

Programmer
Jul 29, 2001
488
US
i have this situation where the first time a form is loaded, reset works fine. however, if I do a submit and the target is forwarded to "error", reset does not work anymore. Does anyone know how to set this up correctly?

in struts-config,xml, i have this entry:-

<forward name=&quot;success&quot; path=&quot;/audit.jsp&quot;/>
<forward name=&quot;error&quot; path=&quot;/audit.jsp&quot;/>

In short, whether the result is success or error, i want it to go back to the same page.

thanks

~za~
You can't bring back a dead thread!
 
Reset, as it named, is to reset the fields to their default value, not clear the form fields. When the form is first load, all form field default value are empty, and reset acts like clear form. When the form is sumbitted, in order for user to see what they have submitted when there is validation error, Struts set the default value to what the fields were submitted. In this case, when field are reset, they are reset to the last submitted value.

If you want to clear field, you would have to write you only javascript function.
 
thanks!

~za~
You can't bring back a dead thread!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top