Ver Mensaje Individual
  #2 (permalink)  
Antiguo 11/09/2005, 17:09
Avatar de mamon
mamon
 
Fecha de Ingreso: enero-2002
Ubicación: Lima
Mensajes: 1.302
Antigüedad: 23 años, 4 meses
Puntos: 3
ok, te he hecho una aplicación que puede hacer eso.. no la he podido probar.. tienes que conectarte a tu base de datos, esa linea no la he puesto... revisalo pues.. si sale un error trata de arreglarlo.

<%
xpais = trim(request.QueryString("pais"))

'te conectas a tu base de datos con la variable oCN

strSQL = "select nombre, id_pais from pais"
set RS = oCN.execute(strSQL)
if Cstr(xpais) <> "" then



strSQL = "select id_provincia, nombre from provincias where id_pais = "& xpais
set oRS = oCN.execute(strSQL)
end if
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
<script language="javascript">
function actualizar(){
location.href = "pag.asp?id_pais = " + document.getElementById("pais");
}
</script>
</head>

<body>
<select name="pais" id="pais" onchange="actualizar();">
<%do while not RS.eof%>
<option value="<%=trim(RS("id_pais"))%>"><%=trim(RS("nombr e"))%></option>
<%
RS.movenext
loop
%>
</select>
<select name="provincia" id="provincia">
<%
if not oRS.eof
do while not oRS.eof
%>
<option value="<%=trim(oRS("id_provincia"))%>"><%=trim(oRS ("nombre"))%></option>
<%
oRS.movenext
loop
end if
%>
</select>
</body>
</html>
__________________
Yo si sé lo que es trabajar duro, porque lo he visto.