tllcll 0 Newbie Poster

Hi,
I would like to know how to assign and display the value to a column name 'item_name' in first.jsp

I have 2 jsp pages - first.jsp , second.jsp. The first.jsp will call the second.jsp and pass in the value. In the second.jsp, I will call the method in the bean file. how do I assign the value and return to the first.jsp.

In second.jsp, i manage the get the value for itemDesc but not sure how to assign this to the column 'item_name' in first.jsp

TQ

The following codes for yr ref
second.jsp
--------------
<jsp:useBean id = "trx" class=".trx.TransDetails" scope="request" />
<% String in_num = request.getParameter("in_num");
String itemDesc = trx.getItem(in_num); // pass in the code and get from database the desc, and return to itemDesc to be display in first.jsp

%>
<script>
window.history.back();
</script>

first.jsp - part of the html body
------------------------------------
<table border="1" width="100%">
<tr>
<th bgcolor="#99CCFF" width="3%">No.</th>
<th bgcolor="#99CCFF" width="15%">Item Code</th>
<th bgcolor="#99CCFF" width="25%">Item Name</th>
</tr>

<%
int i;
for (i=1;i<=5;i++) {%>

<tr>
<td width="3%"><center><%=i%></center></td>
<td width="15%">
<input type="text" name="item_num<%=i%>"
style="width:100%;text-align:left;" maxlength=15
onChange="location.href='second.jsp?in_num='+this.value,
openRow(<%=i%>);">
</td>

<td width="19%">
<input type="text" name="materialDesc<%=i%>"
style="width:100%" value="" disabled>
</td>
</tr>
</table>