earth4x Posted April 6, 2006 Share Posted April 6, 2006 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 More sharing options...
Siddhesh Posted April 6, 2006 Share Posted April 6, 2006 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...<{POST_SNAPBACK}> 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 More sharing options...
Webworldx Posted April 10, 2006 Share Posted April 10, 2006 heh, try something likearray = textarea.split(/\r\n/g); Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now