I have this code in a ASP page:
When the drop-down is selected I need to run another MySQL query to produce the drop-down
values for another drop-down.
How can i do this, as you can see i have attempted this with setting the boolean vaue bRunMySQL.
Any ideas?
TIA.
Picco
Code:
<% set rsregion=con.execute("SELECT DISTINCT Geog_loc FROM `dbo_tp_country` where Geog_loc IS NOT NULL order by Geog_loc asc") set rsregion2=con.execute("SELECT DISTINCT Geog_loc,area,CountryCode FROM `dbo_tp_country` where Geog_loc IS NOT NULL order by CountryCode asc") %> <select name="region" style="font-size:9px" onChange="<%bRunMySQL=true%>"> <% if not rsregion.eof then while not rsregion.eof %> <option value="<%=rsregion2("CountryCode")%>" id="region<%=r%>"><%=rsregion("Geog_loc")%> <% r=r+1 rsregion.movenext wend end if rsregion.close set rsregion=nothing %> </select> <% if bRunMySQL then set rstest=con.execute("select * from dbo_tp_city") response.Write "select * from dbo_tp_city" end if %>
values for another drop-down.
How can i do this, as you can see i have attempted this with setting the boolean vaue bRunMySQL.
Any ideas?
TIA.
Picco
Comment