Hi
How to cache the user's input in a jsp page? The following is some code of my JSP:
<%
int item_num = 5;
int row_num = 1;
if(request.getParameter("row_num")!=null){
String rowstr = (request.getParameter("row_num"));
try{
row_num = Integer.parseInt(rowstr);
}
catch(NumberFormatException ne){}
}
%>
...................
...................
<TR class="LGREY">
<TD class="L" align=right width="25%" >Subject : </TD>
<TD class="L" width="75%" >
<INPUT tabIndex=1 maxLength=100 size=40 name=subject>
</TD>
</TR>
..................
<select size="1" name=item_num
ONCHANGE="location=this.options[this.selectedIndex].value;">
<%for(int i=1;i<=5;i++){%>
<option
value="\AddQuotation.jsp?actionfrom=<%=request_from%>&row_num=<%=i%>"<%if(row_num==i){out.print("SELECTED");}%>
>-<%=i%>-</option>
<%}%>
</select>
....................
...................
<%for(int ii=0;ii<row_num;ii++){%>
<tr>
<td width="25%" align="center" ><%=ii+1%></td>
<td width="25%" align="center" >
<INPUT tabIndex=2 maxLength=100 size=25
name=project_detail_<%=ii+1%>></td>
<td width="25%" align="center" >
<INPUT tabIndex=2 maxLength=20 size=10
name=quantity_<%=ii+1%>></td>
<td width="25%" align="center" >
<INPUT tabIndex=2 maxLength=20 size=10
name=unit_price_<%=ii+1%>></td>
</tr>
<%}%>
The choosing of select will refresh this jsp and create the rows as many as choosed.
But how to cache the input of "Subject"?
???? email: <INPUT NAME="email" onChange="checkEmail(this.value)"><BR>
Can I do this without using javascript?