Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Textarea-retaining the text value in the textarea after clicking the back button

Posted on 2008-06-21
2
Medium Priority
?
393 Views
Last Modified: 2013-11-24
I have a textarea in a JSP that loses its text value after the back button of the browser is clicked.  I found the following not totally syntactically correct possible solution:

<% String inputtext = "";
if(textarea.getParameter() != "" && != null)
{
inputtext = text.getParameter();
}

//in HTML
<textarea name="textarea" rows="20" cols="20"<%=inputtext%></textarea>

Can someone provide a different way, agree that this way will work, or modify this way?
I'm not near my work PC where I can test this.
Thanks.
0
Comment
Question by:jwright9
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 28

Accepted Solution

by:
rrz earned 1500 total points
ID: 21839217
I'm not sure what you are asking here.  You press back button then you press forward button to return ? Is that what you are doing ?  Please restate your question in more detail.   Anyway here is proper JSP code.

<%
     String inputtext = request.getParameter("testarea");
     if(textarea == null || "".equals(inputtext.trim())) inputtext = "none found";
%>
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question