How to pass arrays through forms

Results 1 to 3 of 3

Thread: How to pass arrays through forms

  1. #1
    Join Date
    Dec 1969
    Posts
    1,912

    Default How to pass arrays through forms

    I was wondering if it&#039s possible to pass arrays to another page through forms... such as you would pass a single variable through a hidden form field:<BR><BR>Dim IDs(100)<BR><BR>&#060;input type=hidden name="IDs" value=IDs><BR>-----<BR><BR>I know you can&#039t do it that way.. but I wonder if anyone knows an alternate way. I guess I could always go through the entire array and write hidden input fields for each element in the array and pick them up in the reverse order on the next page, but surely there&#039s another way? :) Thanks<BR><BR>Dave

  2. #2
    Joseph Hatcher Guest

    Default RE: How to pass arrays through forms

    You could read each item in the array into one hidden input field and put some kind of delimiter between the objects.<BR><BR>for instance if you used semi-colons<BR><BR>document.form.type.value="sally;bobb y;julie;....."<BR><BR>then you could put them back into an array do what ever you need to <BR><BR>Hope this helps :)

  3. #3
    limbu Guest

    Default RE: How to pass arrays through forms

    Hi Dave,<BR><BR>I&#039m sure session array would help. Try something like this:<BR><BR>session("sid") = id &#039where id is your array<BR><BR>Cheers,<BR>limbu

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •