Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

textbox text should not empty

 
thippareddy mallikarjuna reddy
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi pals

Please help me. i am using one text box and one enter button. i entered some text in the Textbox after i preshed enter button.The entered text in the textbox become empty. i have to see textbox text after i entered.

Thanks
Mallikarjuna
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64683
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Put the text back when you return to the page using the value attribute.
 
srinivasa v reddy
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Reddy,
If you are using struts

use
<html:textarea property="question"rows="10" cols="43" ></html:textarea></p>

The text area values are persist when you click on button.
Try this,
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by srinivasa v reddy:
Hi Reddy,
If you are using struts

use
<html:textarea property="question"rows="10" cols="43" ></html:textarea></p>

The text area values are persist when you click on button.
Try this,


Since JavaRanch has both a JSP and a Struts forum, and since the original poster has posted this in the JSP forum, it should be assumed that he/she isn't using Struts.

thippareddy,
How best to go about re-populating your form fields depends on how you've structured your application. For one example of how to do this, download the SimpleMVC war file from my site http://simple.souther.us.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic