This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to pass values from text area to array  RSS feed

 
Rajesh Veluchamy
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is in the text area i am having the values as

100
101
102
103

and so on

no i want this in array as
a[0] = 100
a[1] = 101
a[2] = 102
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If in the text area they're written like that, then there must be newline (or return) characters. You can search for those in the request parameter in your servlet, and use them to split the value. Something like:
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!