The html:reset button restores the input values to the values that are specified in the value property.
For example, if you have the following inputs in an html page: <input type="text" name="abc1" value="Hello"/> <input type="text" name="abc2" value=""/> <input type="reset"/> the user can change the values of the inputs typing new values in the browser, and if he press the reset button, what will happen is that abc1 will get "Hello" value and abc2 will be "". Reset doesn't clear the fields but restores to the original values that are specified in the value attribute of the input tag. Using html:text will produce the value attribute tith the corresponding value of the property asocited to the html:text tag. Cheers. Guillermo. >-- Mensaje original -- >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> >Date: Fri, 20 Aug 2004 22:06:43 -0700 (PDT) >From: lixin chu <[EMAIL PROTECTED]> >Subject: ><html:reset> does not clear all on the page ? >To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > > >Hi, >A new problem: >I have a Clear button which suppose to clear the input >fields. However, when I use bean:write to display the >current value on the page, and disable reset() in the >ActionForm, after pressing Clear button, the value in >Form (session scope) is still displayed on the page. > >is it expected ? I thought Clear does clear whatever >on the page (form) and values in the ActionForm are >not touched. > >thanks ! >li xin > >JSP code below: >------------------------------------------------ ><html:form action="/admin/OrgAction"> ><table> > <th Basic Information</th> > <tr> > <td>Name*:</td> > <td><input type=text name=name size=20 >value='<bean:write name="createOrgForm" >property="name"/>'/></td> > </tr> > > <tr> > <td>Description :td> > <td><input type=text name=description size=20 >value='<bean:write name="createOrgForm" >property="description"/>'/></td> > </tr> > > <tr> > <td></td> > <td align=left><html:submit><bean:message >key="button.update"/></html:submit></td> > <td align=right><html:reset><bean:message >key="button.clear"/></html:reset></td> > </tr> > ></table> > > > >_______________________________ >Do you Yahoo!? >Win 1 of 4,000 free domain names from Yahoo! Enter now. >http://promotions.yahoo.com/goldrush > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > ________________________________________ FiberTel, el nombre de la banda ancha http://www.fibertel.com.ar --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]