Prova così e poi mi sipeghi come funziona il tutto, il codice, cosa fa e come gira, altrimenti non ti scrivo più nulla.
codice:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento senza titolo</title>
<style type="text/css">
<!--
@import url("Cellette.css");
.Stile13 {color: #FF0000}
.Stile15 { color: #000099;
}
.Stile18 { color: #000099;
font-size: 24px;
font-weight: bold;
}
.Stile23 {color: #999999}
.Stile24 {color: #330099}
.Stile24 {color: #FF0000}
.Stile3 {font-family: Arial, Helvetica, sans-serif}
-->
</style>
</head>
<body>
<form action="">
<%
pr = request.queryString("pr")
pagina = request.serverVariables("PATH_INFO")
set conn = server.createObject("ADODB.Connection")
conn.open MM_Regioni_STRING
sql = "SELECT DISTINCT(pr) FROM strutture GROUP BY pr"
set rs = conn.execute(sql)
if not rs.eof then
%>
<select name="Pr" id="Pr" onchange="document.location.href=<%=pagina%>?pr='+this.value;">
<option value="" selected="selected">SELEZIONA</option>
<%
do until rs.eof
%>
<option value="<%=rs("pr")%>"><%=rs("pr")%></option>
<%
rs.moveNext
loop
%>
</select>
<%
end if
rs.close
set rs = nothing
if len(pr) > 0 then
sql = "SELECT * FROM strutture WHERE pr = '" & pr & "'"
set rs = conn.execute(sql)
if not rs.eof then
%>
<select name="Comune" id="Comune">
<option value="" selected="selected">SELEZIONA</option>
<%
do until rs.eof
%>
<option value="<%=rs ("comune")%>"><%=rs("comune")%></option>
<%
rs.moveNext
loop
%>
</select>
<%
end if
rs.close
set rs = nothing
end if
conn.close
set conn = nothing
%>
</form>
</body>
</html>