|
Okay, I have something that is really baffling me.
I'm writing a multiple select option box that is reading in from a database. I'm reading in three values, joining them together as a string.
<td><select name="Record" multiple="multiple" >
<% While Not rsAtlasTable.EOF %>
<option value="<%=Trim(rsAtlasTable("Company")) & ", " & Trim(rsAtlasTable("State")) %>"><%=TRIM(rsAtlasTable("Company")) & ", " & Trim(rsAtlasTable("State")) & ", " & Trim(rsAtlasTable("ID")) %></option>
<% rsAtlasTable.MoveNext
Wend %>
Now, I want to be able to split the values into a multiple dimension array. Basically, what I want is the ID number so I can build an SQL query to pull only those records.
If I do a SPLIT(), it creates a single array. Note I'm splitting for a comma deliminator. For example...
arrRecord = Split(Request.Form("Record"), ", ", -1, 1)
What this gives me is an array with value[0] = Company Name, value[1] = State and value[2] = ID.
This is a no go.
Now, I'm thinking after this post I can go back and "cheat" by just making the ID the first item in the multiple select box and then try not to pull on the other values, as I want only the ID field.
But, is there a way to create a multidimensional array in ASP with a multiple select?
Should I do this in JavaScript and just write to ASP variables (can you do that?)
Donna
|