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

Splitting text in a textarea form

Status
Not open for further replies.

happyb

Programmer
Oct 25, 2000
29
AU
Hi,

I want to take each value that is entered into a textarea seperated by a carraige return, and apply an action on each value.

For instance if I put these values in a textarea

cats
dogs
fish

I want to take cats, dogs, and fish as seperate values to display on a page like this:

Emma likes cats
John likes dogs
Jane likes fish

Using the response.write variable ofcourse.

I know how to seperate the values into <br>'s but I don't know how to access them seperatley as values.

Thanks for any help

HappyB
 
How about this:
Code:
strTextArea = Request.Form(&quot;textareaname&quot;)

strTextArray = Split(strTextArea,vbcrlf)

strTextArray should now be an array with each new line as a separate entry.

I hope this (or something like it) works as I havent tried it myself.

Tony
reddot.gif WIDTH=400 HEIGHT=2 VSPACE=3

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top