Any help appreciated on this as I'm stuck at this point after many confusing hours. This is on a complex classic asp page and I'd rather keep the changes minimal. I've had to add a drop down filter box at the top of the page, further down a recordset loops to load records. I'm looping at the top near the filter and load the filter items into a dictionary, but I have two issues that I'm just spinning my wheels on:
1. how to get the value selected out of the dropdown selector below and
2. how to pass it as a parameter back to the same page (emplist_mainten.asp)
I'm using the action=pagename in the form below, but I've tried with and without this form to no effect. The page is not reloading at this point, and when it occasionally did there was no parameter passed in chrome - but IE got the parameter until that too broke. Note that in code above this I'm looping through the recordset and stuffing the data values into a dictionary. The drop down is populating properly from the dictionary, but I'm not getting a value out of the drop down. I have not used dictionaries before and perhaps I'm not using it correctly.
<form action="emplist_mainten.asp" method="get">
<Select id="FilterDepartment" name="FilterDepartment" onchange="self.location=self.location+'?FilterDepa rtment='+FilterDepartment.options[FilterDepartment.selectedIndex].text;>
<% dim i,a,s
a=DeptDict.Items
For i = 0 To DeptDict.Count -1 %>
<option value="<%= (a(i)) %>"> <%= (a(i)) %></option>
<% Next %>
</Select>
</form>
Thanks for any suggestions!
1. how to get the value selected out of the dropdown selector below and
2. how to pass it as a parameter back to the same page (emplist_mainten.asp)
I'm using the action=pagename in the form below, but I've tried with and without this form to no effect. The page is not reloading at this point, and when it occasionally did there was no parameter passed in chrome - but IE got the parameter until that too broke. Note that in code above this I'm looping through the recordset and stuffing the data values into a dictionary. The drop down is populating properly from the dictionary, but I'm not getting a value out of the drop down. I have not used dictionaries before and perhaps I'm not using it correctly.
<form action="emplist_mainten.asp" method="get">
<Select id="FilterDepartment" name="FilterDepartment" onchange="self.location=self.location+'?FilterDepa rtment='+FilterDepartment.options[FilterDepartment.selectedIndex].text;>
<% dim i,a,s
a=DeptDict.Items
For i = 0 To DeptDict.Count -1 %>
<option value="<%= (a(i)) %>"> <%= (a(i)) %></option>
<% Next %>
</Select>
</form>
Thanks for any suggestions!