Jump to content

Putting textarea info in an array


earth4x

Recommended Posts

I have a text area set up in my page with a javascript array in the code... What i wanna do is for example enter some numbers in my text area like so :506070 etc...And I want this information to go in an array has so :50 as [0]60 as [1]70 as [3]etc...but.. I just can't find a way to do it.. I tried making a table.push but it isn't workingcan someone help me?

Link to comment
Share on other sites

I have a text area set up in my page with a javascript array in the code... What i wanna do is for example enter some numbers in my text area like so :50 as [0]60 as [1]70 as [3]etc...

I m not giving u the perfect solution but you can try doing something like....For The Textarea on keypress event call a function.If The Key pressed is ENTER then add that element into a javascript aray.last element u can get by searching last and 2nd last Enter..This is the logic according to me.there may be better way.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...