Una ayuda porfavor, me dieron un tutorial de como hacer listas dependientes.
http://www.tunait.com/javascript/ind...asdependientes
hice la codificacion con php y ahora solo llena la primera lista, estoy mal en algun codigo o estoy llenando mal la base de datos?

Código :

<DOCTYPE> 
<html> 
<head> 
<title>Documento sin t&iacute;tulo</title> 
<meta> 
<script> 
/************************************************ 
Listas dependientes por Tunait!(5/1/04) 
Si quieres usar este script en tu sitio 
eres libre de hacerlo con la condición 
de que permanezcan intactas estas líneas, 
osea, los créditos. 
No autorizo a publicar y ofrecer el código 
en sitios de script sin previa autorización 
Si quieres publicarlo, por favor, contacta conmigo. 
http://javascript.tunait.com/ 
[email protected] 
*************************************************/ 
<!-- 
function slctr(texto,valor){ 
this.texto = texto 
this.valor = valor 
} 
function slctryole(cual,donde){ 
if(cual.selectedIndex != 0){ 
donde.length=0 
cual = eval(cual.value) 
for(m=0;m<cual.length;m++){ 
var nuevaOpcion = new Option(cual[m].texto); 
donde.options[m] = nuevaOpcion; 
if(cual[m].valor != null){ 
donde.options[m].value = cual[m].valor 
} 
else{ 
donde.options[m].value = cual[m].texto 
} 
} 
} 
} 

<link> 
var cat_<res>=new Array() 
cat_<res>] = new slctr('- -<res>- -') 
<if> 
cat_<res>] = new slctr("<res2>",'cat_<res2>'); 
mysql_close($link); 

<? } 
} 
?> 
//--> 
</script> 
</head> 
<body> 
<form> 

<fieldset> 
<select> 
<option>- - Seleccionar - -</option> 
<foreach>$cat){ ?> 
<option><cat></option> 

</select> 
<select> 
<option>- - - - - -</option> 
</select> 
<select> 
<option>- - - - - -</option> 
</select> 
</fieldset> 
</form> 
</body> 
</html>

_________________
Atte. Jose Luis el Cordero