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!

Reading Items for textarea

Status
Not open for further replies.

mdr2271

Programmer
Sep 14, 2005
42
US
I want to be able to allow users to enter in a series of ID numbers into a textarea and then be able to take those ID numbers and break them up into separate records. For example, in the textarea they would enter something like this:

0000234
0004532
0000291
0009873

I then want to be able on the page the form is sent to break those up into four separate records.

Can anyone recommend the best way to do this?
 
values = request.form("textarea")
valuearray = split(values,vbcr)
for each value in valuearray
select record from db, ... do whatever
next



mind you it's psuedocode [dazed]

[thumbsup2]DreX
aKa - Robert
if all else fails, light it on fire and do the happy dance!
" I always think outside the 'box', because I'm never inside the 'loop' " - DreX 2005
 
you may also only want to use one record at a time, then basically have a "go to next page" kind of thing, in this instance, you just use the first item in the for/next for display, and take the remainder of them and put them into a hidden form element and repeat the process on the next page, knocking the "grouped" record id's down one at a time each step.

[thumbsup2]DreX
aKa - Robert
if all else fails, light it on fire and do the happy dance!
" I always think outside the 'box', because I'm never inside the 'loop' " - DreX 2005
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top