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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Assigning values from variables to textarea field on form

Status
Not open for further replies.

rondavid

Programmer
Apr 29, 2003
19
US
I have a asp page that reads data from a text file and assigns the data to a textarea field on my form using the following command on the window load event:

thisform.textarea1.value = &quot;<%=aTxtA(1)%>&quot;

This code works fine, but the problem I'm having is that I cannot assign the newline. If the data contains 3 lines in the text file then I want to display in the textarea the 3 line exactly as they appear in the text file. I would greatly appreciate any help or advice. Thanks
 
does aTxtA(1) hold all the three lines?
if yes then do this
aTxt=replace(aTxtA(1),&quot;vbcrlf&quot;,&quot;\n&quot;)

thisform.textarea1.value = &quot;<%=aTxt%>&quot;

Note:
This code is strictly experimental.




Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top