getting array values 
Author Message
 getting array values

I am trying to retrieve the values of elements in an array...
how do I get it using 'request.form'?
I tried the following:

var1=request.form("array")(0)
var1=request.form("array(0)")
var1=request.form("array",0)

any suggestions are greatly appreciated.
Hammy



Sat, 11 Oct 2003 03:08:35 GMT  
 getting array values
It's not an array, it's a collection...

set colArray = request.form("array")
for each varValue in colArray
    '... do something with varValue
next

set colArray = request.form("array")
for n = 1 to colArray.count
    varValue = colArray.item(n)
    '... do something with varValue
next

--
Michael Harris
Microsoft.MVP.Scripting
--

Please do not email questions - post them to the newsgroup instead.
--

Quote:

> I am trying to retrieve the values of elements in an array...
> how do I get it using 'request.form'?
> I tried the following:

> var1=request.form("array")(0)
> var1=request.form("array(0)")
> var1=request.form("array",0)

> any suggestions are greatly appreciated.
> Hammy



Sat, 11 Oct 2003 04:18:03 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. getting array values

2. NetFileDir and undedicated server ?

3. Getting a value from a UserProperty array?

4. Getting data values to CR from variable arrays and stand alone variables in VB

5. Getting maximum value from array

6. getting R G B values from a long value

7. Convert array of value type to array of reference type

8. Delphi/Informix/Ado/Serial fields

9. Finding Info from a Database.

10. Interbase and BLOB fields

11. Q: TQuery -> count of result sets > 1 -> how to get the last one (MSSQL 6.5)

12. THelpMe.Create('MSSQL Mixed Security Doesn't work');

 

 
Powered by phpBB® Forum Software