0

in a jsp page I need to get a variable and then I need to set the txt in a txtbox on the page with the variable. How do I do this ( quick code example pls)

2
Contributors
3
Replies
4
Views
10 Years
Discussion Span
Last Post by ceyesuma
0

<td >
<textarea name="nam1" cols="70" rows="10" id="name1" ><%=rs.getString("name")%></textarea></td>

if the value from previous page

use this
String n=reguest.getParameter("fieldid");
<td >
<textarea name="nam1" cols="70" rows="10" id="name1" ><%=n%></textarea></td>

if textbox
</td>
<input name="market" type="text" id="market" value="<%=rs.getString("market")%>" size="50"></td>

0

<td >
<textarea name="nam1" cols="70" rows="10" id="name1" ><%=rs.getString("name")%></textarea></td>

if the value from previous page

use this
String n=reguest.getParameter("fieldid");
<td >
<textarea name="nam1" cols="70" rows="10" id="name1" ><%=n%></textarea></td>

if textbox
</td>
<input name="market" type="text" id="market" value="<%=rs.getString("market")%>" size="50"></td>

Thanks that helps a lot.(textbox example)

0

yes
that is good for text box. But what if I already created the textbox earlier with default value and I want ot <%= put something %> in it. How do I change value without creating another instance of txtbox?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.