Hi I have a page with a form and a results page.

My form: <form name = "theform" action="results.asp" method="post">

Part of the form is 5 dropdown boxes, which the user selects a value
from and clicks a button. Clicking the button adds the 5 values to a 2
dimensional array, and each line of the array is then displayed in a
select box with each element seperated with || such as 1||2||3||4||5.

My array:
redim preserve empnum(5,z)

empnum(0,z)=document.theform.injured.value
empnum(1,z)=document.theform.mechanism.value
empnum(2,z)=document.theform.agency.value
empnum(3,z)=document.theform.bodypart.value
empnum(4,z)=document.theform.nature.value
empnum(5,z)=document.theform.treatment.value

The results page is a check for the user before they submit the data
to the database. I have the rest of results from the form displaying
on the results page, but how can I display the contents of the array
on the results page???

A little help would be much appreciated.

Re: Submit vbscript array contents in form by tomthumbkop

tomthumbkop
Fri Apr 30 09:21:34 CDT 2004


My first question to you would be why are you using a 2d array
Dictionaries, IMO, are almost always easier. As for how to display th
2d array, you can use a for loop from 0 to the UBound of the 2n
dimension of your array.

Andrew wrote:
> *Hi I have a page with a form and a results page.
>
> My form: <form name = "theform" action="results.asp" method="post">
>
> Part of the form is 5 dropdown boxes, which the user selects a value
> from and clicks a button. Clicking the button adds the 5 values to
> 2
> dimensional array, and each line of the array is then displayed in a
> select box with each element seperated with || such a
> 1||2||3||4||5.
>
> My array:
> redim preserve empnum(5,z)
>
> empnum(0,z)=document.theform.injured.value
> empnum(1,z)=document.theform.mechanism.value
> empnum(2,z)=document.theform.agency.value
> empnum(3,z)=document.theform.bodypart.value
> empnum(4,z)=document.theform.nature.value
> empnum(5,z)=document.theform.treatment.value
>
> The results page is a check for the user before they submit the data
> to the database. I have the rest of results from the for
> displaying
> on the results page, but how can I display the contents of the array
> on the results page???
>
> A little help would be much appreciated.


-
tomthumbko
-----------------------------------------------------------------------
Posted via http://www.codecomments.co
-----------------------------------------------------------------------