
05/03/2002, 23:38
|
 | Colaborador | | Fecha de Ingreso: diciembre-2001 Ubicación: Curaçao (Antillas Holandesas)
Mensajes: 3.179
Antigüedad: 23 años, 2 meses Puntos: 38 | |
Re: categorias y busqueda 3dboy, muchas veces no es aconsejable autoresponderse los mensajes para que suban, ya que pasa lo que te sucedió ayer, es decir, mucha gente debe haber dado tu pregunta por respondida.
Te mando un modelito sencillo que funciona, tiene un alert para que lo corras y lo entiendas, luego, elimínalo y decomenta el window.location.
En la matriz debes poner los nombres de las páginas que necesitas.
---------------------------------------------------------------------------------------------------------------------------
<html>
<head>
<script language="JavaScript">
function selectPage(){
var aPages = new Array(new Array("Categ0Local0.html", "Categ0Local1.html", "Categ0Local2.html"),
new Array("Categ1Local0.html", "Categ1Local1.html", "Categ1Local2.html"),
new Array("Categ2Local0.html", "Categ2Local1.html", "Categ2Local2.html"));
var nCateg = document.formulario.categoria.selectedIndex;
var nLocal = document.formulario.localidad.selectedIndex;
// window.location = aPages[nCateg][nLocal];
alert(aPages[nCateg][nLocal]);
}
</script>
</head>
<body>
<form name="formulario">
<select name="categoria" onchange="selectPage()">
<option>Categoria 0</option>
<option>Categoria 1</option>
<option>Categoria 2</option>
</select><br>
<select name="localidad" onchange="selectPage()">
<option>Localidad 0</option>
<option>Localidad 1</option>
<option>Localidad 2</option>
</select>
</form>
</body>
</html>
---------------------------------------------------------------------------------------------------------------------------
Suerte. |