Quien me puede proporcionar un ejemplo de DIV, para realizar un maestro detalle con dos SELECT, de tal forma que si selecciono un valor en uno, el otro cambien sus contenidos.
No se si me entienden?
| |||
|
| ||||
A ver si te sirve este: <HTML> <HEAD> <TITLE>SOLICITUDES</TITLE> </HEAD> <BODY> <FORM ACTION="procedimiento" METHOD="post" name="juridicas" > <select size=1 name="p_sol_proy_departamento" onChange="redirect(this.options.selectedIndex)"> <OPTION value="04">Ahuachapan <OPTION value="12">Cabañas <OPTION value="06">Chalatenango </select> <select name="p_sol_proy_municipio" size="1""> <OPTION value="01">Ahuachapan <OPTION value="02">Apaneca <OPTION value="03">Atiquizaya <OPTION value="13">Cara Sucia <OPTION value="04">Concepcion de Ataco <OPTION value="05">El Refugio <OPTION value="06">Guaymango <OPTION value="07">Jujutla <OPTION value="09">San Lorenzo <OPTION value="10">San Pedro Puxtla <OPTION value="08">Sn. Francisco Menend <OPTION value="11">Tacuba <OPTION value="12">Turin </select> <script> <!-- var groups=document.juridicas.p_sol_proy_departamento. options.length var group=new Array(groups) for (i=0; i<groups; i++) group[i]=new Array() group[0][0]=new Option("Ahuachapan","01") group[0][1]=new Option("Apaneca","02") group[0][2]=new Option("Atiquizaya","03") group[0][3]=new Option("Cara Sucia","13") group[0][4]=new Option("Concepcion de Ataco","04") group[0][5]=new Option("El Refugio","05") group[0][6]=new Option("Guaymango","06") group[0][7]=new Option("Jujutla","07") group[0][8]=new Option("San Lorenzo","09") group[0][9]=new Option("San Pedro Puxtla","10") group[0][10]=new Option("Sn. Francisco Menend","08") group[0][11]=new Option("Tacuba","11") group[0][12]=new Option("Turin","12") group[1][0]=new Option("Cinquera","02") group[1][1]=new Option("Dolores","03") group[1][2]=new Option("Guacotecti","04") group[1][3]=new Option("Ilobasco","05") group[1][4]=new Option("Jutiapa","06") group[1][5]=new Option("San Isidro","07") group[1][6]=new Option("Sensuntepeque","01") group[1][7]=new Option("Tejutepeque","08") group[1][8]=new Option("Victoria","09") group[2][0]=new Option("Agua Caliente","02") group[2][1]=new Option("Arcatao","03") group[2][2]=new Option("Azacualpa","04") group[2][3]=new Option("Cancasque","05") group[2][4]=new Option("Chalatenango","01") group[2][5]=new Option("Citala","06") group[2][6]=new Option("Comalapa","07") group[2][7]=new Option("Concepcion Quezalpeq","08") group[2][8]=new Option("Dulce Nombre de Ma.","09") group[2][9]=new Option("El Carrizal","10") group[2][10]=new Option("El Paraiso","11") group[2][11]=new Option("La Laguna","12") group[2][12]=new Option("La Palma","13") group[2][13]=new Option("La Reina","14") group[2][14]=new Option("Las Flores","15") group[2][15]=new Option("Las Vueltas","16") var temp=document.juridicas.p_sol_proy_municipio 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 } //--> </script> </form> </BODY> </HTML>
__________________ Bien se puede recibir una puñalada sin adulación, pero rara vez se recibe una adulación sin puñalada ** *** |