It should be fairly straightforward.
Get the content of the text field: $("PartNum").val();
Use the split() function to split each line by "\n" (return).
Then for each of those lines, split it again by " " (space).
(Store all of these in an array(s).)
Then you can use the join() function to add "," (comma) to a list in
your array.

On Oct 6, 1:32 pm, "robert...@gmail.com" <robert...@gmail.com> wrote:
> I really hope someone can assist:
>
> I am trying to take a form field:
> <textarea name="PartNum" cols="15" rows="5"  id="PartNum" value=""></
> textarea>
>
> The user will put in part numbers , space, qty, carraige return ,then
> another entry on the next line....it will look like this:
>
> bd1111 2
> bd1200 5
>
> I want to split this into two querystring variables before submitting
> to next page:
>
> mypage.asp?Partnum=bd1111,bd1200&Qty=2,5
>
> I have looked at the serialize() and array functions , but I can't
> figure it out.
>
> thanks very much

Reply via email to