On one page I have several checkboxes in a form:

time0, time0, time0
time1, time1, time1

by naming each checkbox time0, I create an array of size 3. Of course the
same applies to the time1 variable.

Now i do a SUBMIT via "post" method and i'm on the next page.

I have a 2d array:

dim myarray(3,2)

i want to place each timeX variable into it's appropriate spot.

I tried:

myarray(0) = request.form("time0")

and IIS returns this error:

Microsoft VBScript runtime (0x800A0009)
Subscript out of range

How can I copy this into into the array?

Thanks in advance for a solution.

Re: copying array into 2D-array by Bob

Bob
Thu Dec 04 13:15:38 CST 2003

Mark Watkins wrote:
> On one page I have several checkboxes in a form:
>
> time0, time0, time0
> time1, time1, time1
>
> by naming each checkbox time0, I create an array of size 3. Of
> course the same applies to the time1 variable.
>
> Now i do a SUBMIT via "post" method and i'm on the next page.
>
> I have a 2d array:
>
> dim myarray(3,2)
>
> i want to place each timeX variable into it's appropriate spot.
>
> I tried:
>
> myarray(0) = request.form("time0")

myarray(0,0) = request.form("time0")

You have a 2D array: you need to use both dimensions.

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.