Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TextArea Unable to Redisplay data after Validation 2

Status
Not open for further replies.

teblack

Programmer
Apr 30, 2004
45
I have a form that has a couple of textarea boxes on it. Once the user enters their information and presses the continue button the asp page goes through a validation routine. If errors are found then the data entry page is re-displayed with all of the data re-filled back into the form. The problem is the textareas are not re-populating. I can issues a response.write and the fields have the data in them, but I can not see it once the form re-displays.

Any help. Thanks in advance for any help.

TBlack -
 
How are you refilling the textarea? I believe for textarea you have to put it's contents between the <textarea> and </textarea> tags.


Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
As Tracy says:
Code:
  <textarea name="blah">[COLOR=red]<%response.write(variable);%>[/color]</textarea>

<marc>
New to Tek-Tips? Get better answers - faq581-3339
 
Except: no semicolon

(mixed up your vbs and javascript?)


Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Both textarea boxes are defined the same.....

Code:
<textarea NAME="termreason" rows=4 cols=25 onkeyup="if (this.value.length > 100) this.value=this.value.substr(0,100);" value="<%=termreason%>"></textarea></td>


Thanks..

TBlack -
 
Doh!

It's such an ingrained habit...I don't do much vbs - can you tell?!
(And when I do do vbs, I have to spend *a lot* of time debugging syntax errors)

<marc>
New to Tek-Tips? Get better answers - faq581-3339
 
As manarth said, textareas don't have a value attribute. Use his example of how to set up a textarea and it should work for you.

Lee
 
manarth: Don't think you're the only one? How do you think I knew what the problem was?

To make matters worse, I also do a lot of VB, which is just different enough from VBS (i.e VBS does not have an iif statement) that it confuses the heck out of me at times.


Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Thanks to all, that fixed the problem. I removed the value clause and placed my element name with the textarea tags.

Code:
   			<textarea NAME="termreason" rows=4 cols=25 onkeyup="if (this.value.length > 100) this.value=this.value.substr(0,100);"><%=termreason%></textarea></td>

Thanks again for the help with this.



TBlack -
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top