Ver Mensaje Individual
  #1 (permalink)  
Antiguo 23/06/2006, 01:14
aruizroldan
 
Fecha de Ingreso: octubre-2003
Mensajes: 280
Antigüedad: 21 años, 5 meses
Puntos: 1
Transformar doble combo en triple combo. ayuda

Hola a todos. Tengo el siguiente código :
Código PHP:
<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>
</
head>

<
body>
<
form NAME="theform" ID="theform" ACTION="index9.php">

<
SELECT onchange=redirect(this.options.selectedIndexsize=1 name=example style="width:245px;"
<
OPTION SELECTED>Seleccione un material</OPTION>
<
OPTION>Panel fonoabsorbente</OPTION>
<
OPTION>Elastómero</OPTION
<
OPTION>Placa de Yeso laminado (PYL)</OPTION>
</
SELECT>
<
br><br><br>
<
SELECT size=1 name=SelectList id=SelectList style="width:245px;">
<
OPTION>Seleccione un espesor</OPTION
</
SELECT>
<
SCRIPT>
<!--

var 
groups=document.theform.example.options.length
var group=new Array(groups)
for (
i=0i<groupsi++)
group[i]=new Array()

group[1][0]=new Option("30","1")
group[1][1]=new Option("40","2")
group[1][2]=new Option("70","3")

group[2][0]=new Option("2","4")
group[2][1]=new Option("4","5")
group[2][2]=new Option("6","6")

group[3][0]=new Option("11","7")
group[3][1]=new Option("13","8")
group[3][2]=new Option("15","9")
group[3][3]=new Option("18","10")

var 
temp=document.theform.SelectList

function redirect(x){
for (
m=temp.options.length-1;m>0;m--)
temp.options[m]=null
for (i=0;i<group[x].length;i++){
temp.options[i]=new Option(group[x][i].text,group[x][i].value)
}
temp.options[0].selected=true
}

function 
go(){
location=temp.options[temp.selectedIndex].value
}
//-->
</SCRIPT>
</form>
</body>
</html> 
Como podeis ver, ahora solo hay 2 combos : example y SelecList. Pues bien, me gustaria que apareciera un tercer combo dependiendo del valor de SelectList. ¿Con éste código seria posible? ¿Que cambios debo de hacer?

En paginas de javascript he visto triples combos pero utilizando varios form, para que me sirva tiene q ser como este, es decir, un único form.

Necesito vuestra ayuda.

Un saludo.