i have a form, on which after i click submit, i want the existing elements to get cleared off , ie, all those form fields and button to be cleared, and the result i wanna display be displayed
kind of like clrscr() in c++. is there anything in JSP or HTML for that?
i want to do it on the same page only. that's why i'm asking and so please don't tell to print the new stuff on a new page
<html>
<head>
<title>parameter example</title>
</head>
<body>
<form action="pex.jsp" method=POST>
<table align=center border =1 >
<tr>
<td>param1
<td><input type=text name=p1 />
</tr>
<tr>
<td>param2
<td><input type=text name=p2 />
</tr>
<tr><td colspan=2><input type=submit value="submit" /></td></tr>
</table>
</form>
</body>
</html>
pex.jsp
<%@ page language="Java" %>
<%! String p1,p2; %>
<% p1=request.getParameter("p1");
p2=request.getParameter("p2");
if(name==null)
name=" ";
%>
<html>
<body>
hello <%= p1+" "+p2%>
</body>
</html>