Hi,
I have created a drop down menu form which connects dynamically to a DB table. The table contains 2 fields, the ID and County. What I want to be able to do with the drop down menu is use the counties it lists as hyperlinks to that particular counties page, ie select a scroll to a particlur county on the menu, click on submit and up comes the relevant page but all I keep getting is the same county - ie the one with an ID of 1. I've tried passing a variable to assume the name of the county but nothing works. My code is below -where am I going wrong? Appreciate any Help!
Enda D
<% Set country=Server.CreateObject ("ADODB.Recordset"
country.open "SELECT * FROM county WHERE 'ID' IS > 0","DSN=country"
%>
<%
LinkName=country("county"&".asp"
%>
<form Method="GET" action="<%=LinkName%>">
<p><select size="1" name="county">
<% DO WHILE not country.EOF %>
<option value="<%=country("ID"%>"><%=country("County"%></option>
<%
country.MoveNext
Loop
country.Close
Set country=Nothing
%>
</select><input type="submit" value="Go!" name="B1"></p>
</form>
I have created a drop down menu form which connects dynamically to a DB table. The table contains 2 fields, the ID and County. What I want to be able to do with the drop down menu is use the counties it lists as hyperlinks to that particular counties page, ie select a scroll to a particlur county on the menu, click on submit and up comes the relevant page but all I keep getting is the same county - ie the one with an ID of 1. I've tried passing a variable to assume the name of the county but nothing works. My code is below -where am I going wrong? Appreciate any Help!
Enda D
<% Set country=Server.CreateObject ("ADODB.Recordset"
country.open "SELECT * FROM county WHERE 'ID' IS > 0","DSN=country"
%>
<%
LinkName=country("county"&".asp"
%>
<form Method="GET" action="<%=LinkName%>">
<p><select size="1" name="county">
<% DO WHILE not country.EOF %>
<option value="<%=country("ID"%>"><%=country("County"%></option>
<%
country.MoveNext
Loop
country.Close
Set country=Nothing
%>
</select><input type="submit" value="Go!" name="B1"></p>
</form>