rabisco
MIS
- Jan 4, 2007
- 21
I have struggled with this for a few hours, hoping to get some help from here as usual.
I have created this array...
For x = 0 To rs.fields.count - 1
Response.Write("sampleValues[" & x & "] = '" & rs.fields.item(x).value & "';")
Next
because I need to x values to get the indexes of rs.fields.item(x).value into my asp page for use on the next page.
Further down the page
I have a number listboxes created thus....
For x = 0 To rs.fields.count - 1
Response.Write("<OPTION Value=" & x & ">")
response.write rs.fields.item(x).name
Response.Write("</OPTION>")
Next
All this works perfectly.
In the source of the page, at the top I see the array sampleValues, I see the values and the indexes.
What I want to happen is that for each option seleted in the list box, the text box next to it should be populated with a value from the sampleValues array.
what I have which is not working so far is
<SELECT name="excelFieldName_<%=i%>" onChange="document.frmMap.sampleValue_<%=i%>.value=<%= sampleValues%>[this.options[this.selectedIndex].value]">
so I need to sampleValue_<%=i%> to be populated with the values from the sampleValues array when an option in the excelFieldName_<%=i%> list box is selected.
I have created this array...
For x = 0 To rs.fields.count - 1
Response.Write("sampleValues[" & x & "] = '" & rs.fields.item(x).value & "';")
Next
because I need to x values to get the indexes of rs.fields.item(x).value into my asp page for use on the next page.
Further down the page
I have a number listboxes created thus....
For x = 0 To rs.fields.count - 1
Response.Write("<OPTION Value=" & x & ">")
response.write rs.fields.item(x).name
Response.Write("</OPTION>")
Next
All this works perfectly.
In the source of the page, at the top I see the array sampleValues, I see the values and the indexes.
What I want to happen is that for each option seleted in the list box, the text box next to it should be populated with a value from the sampleValues array.
what I have which is not working so far is
<SELECT name="excelFieldName_<%=i%>" onChange="document.frmMap.sampleValue_<%=i%>.value=<%= sampleValues%>[this.options[this.selectedIndex].value]">
so I need to sampleValue_<%=i%> to be populated with the values from the sampleValues array when an option in the excelFieldName_<%=i%> list box is selected.