unable to clear the field in form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • madhuriks
    New Member
    • Jun 2010
    • 149

    #1

    unable to clear the field in form

    hi,
    im learning struts..i had developed simple login application form..it is working fine for submit button...but if im going to reset my form...it is not getting reseted..can any one suggest me where it is getting wrong...i didnt do any validations...j st a simple application...
    Code:
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
     "http://www.w3.org/TR/html4/loose.dtd">
    <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
    <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>Login Form</title>
            <link rel="stylesheet" type="text/css" href="stylesheet.css">
        </head>
        <body>
            <h1>Login Form</h1>
            <html:form action="/login"><table border="0">
                    <tbody>
                        <tr>
                            <td colspan="2">
                                <bean:write name="LoginForm" property="error" filter="false"/>&nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td>Enter Your Name:</td>
                            <td><html:text property="name"/></td>
                        </tr>
                        <tr>
                            <td>Enter Your Email-Id:</td>
                            <td><html:text property="email"/></td>
                        </tr>
                        <tr>
                            <td><html:submit value="Login"/></td>
                            <td><html:reset value="Reset"/></td>
                        </tr>
                    </tbody>
                </table>
            </html:form>
        </body>
    </html>
    thanks,
    madhu.
Working...