Non va ancora... ecco il codice dell'intera pagina...
<%@LANGUAGE="VBSCRIPT"%>
<!--#INCLUDE virtual="inc_common.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../style.css" rel="stylesheet" type="text/css">
<title>Selezione Comune</title>
</head>
<script language="JavaScript" type="text/JavaScript">
function SaveAndClose(ElementID1,ElementID2)
{
window.opener.document.getElementById(ElementID1).value=self.document.getElementById('cmbComuni').value;
window.opener.document.getElementById(ElementID2).value=self.document.getElementById('txtComune').value;
self.close();
}
function change_inner(valore)
{
document.getElementById('txtComune').innerHTML=valore;
}
</script>
<%
Prov = request("Prov")
ElementID1 = request("ElementID1")
ElementID2 = request("ElementID2")
%>
<body bgcolor="#FFFFDD">
<form name="form1" method="post" action="">
<p align="left" class="NormalText">Seleziona il comune:</p>
<p align="center">
<%
if (Prov="") then
CreateComboBoxSQL "cmbComuni", 4, "SELECT Cod_ISTAT, Comune FROM T_Comuni ORDER BY Comune","" ,"change_inner('this.value');"
else
CreateComboBoxSQL "cmbComuni", 4, "SELECT Cod_ISTAT, Comune FROM T_Comuni WHERE Prov='" & Prov & "' ORDER BY Comune","" ,"change_inner('this.value');"
end if
%>
</p>
<p align="center">
<input name="txtComune" id="txtComune" type="hidden" value="">
<input name="Submit" type="submit" class="LittleText" value="Salva & Esci" onclick="JavaScript: SaveAndClose('<%=ElementID1%>','<%=ElementID2%>');">
</p>
</form>
</body>
</html>