tengo un problemon con el filtraje de unos combos y a ver si alguien me puede ayudar. pongo los codigos de todo para ver que se puede hacer. gracias
form_.asp
Código:
continuo: abajo <link rel="stylesheet" href="css_styles.css"> <link rel="stylesheet" href="css_ajax.css"> <style type="text/css"> <!-- body { background-color: #FFFFFF; } .seccion { color: #254A50; } a { color: #497E1A; font-weight: bold; text-decoration: underlined; } a:hover { color: #254A50; font-weight: bold; text-decoration: none; } A.menu { color: #000000; font-weight: normal; text-decoration: none; } a.menu:hover { color: #FFFFFF; font-weight: normal; text-decoration: none; } --> </style> <script language="JavaScript" src="functions.js"></script> <script language="JavaScript" src="prototype.js"></script> <script language="JavaScript" src="base.js"></script> <script type="text/javascript" src="xajax.js"></script> <script type="text/javascript"> window.setTimeout(function () { if (!xajaxLoaded) { alert('Error: the xajax Javascript file could not be included. Perhaps the URL is incorrect?\nURL: /xajax.js'); } }, 6000); </script> <script charset="utf-8" id="injection_graph_func" src="injection_graph_func.js"></script></head><body onload="init();" background="fondo_pantalla.gif"> <form method="post" action="busca.asp" name="registrar" id="registrar"> <input name="accion" value="nuevo_usuario" type="hidden"> <input name="redirect" value="" type="hidden"> <% set conexion=server.createobject("ADODB.connection") basedatos1="DRIVER=Microsoft Access Driver (*.mdb);DBQ="&Server.MapPath("/kyu21/Db/peluqueria.mdb") conexion.open basedatos1 sql="select * from comunidad where comunidad order by comunidad asc" set r1=conexion.execute(sql) %> <select name="comunidad" onchange="if (this.options[this.selectedIndex].value=='<%= r1("comunidad") %>') { Element.hide($('provinciasnoes'));Element.show($('provinciases')); } else { Element.show($('provinciasnoes'));Element.hide($('provinciases')); }" novalid="true" id="comunidad" class="boton" onclick="this.setAttribute('style','');"> <option value="" selected="selected">Seleccione Comunidad</option> <% Do While Not r1.EOF %> <Option VALUE="<%= r1("comunidad") %>"><%= r1("comunidad") %></Option> <% r1.MoveNext Loop r1.Close conexion.Close %> </select> <% set conexion=server.createobject("ADODB.connection") basedatos2="DRIVER=Microsoft Access Driver (*.mdb);DBQ="&Server.MapPath("/kyu21/Db/peluqueria.mdb") conexion.open basedatos2 sql="select * from provincia where provincia order by provincia asc" set r2=conexion.execute(sql) %> <select novalid="true" onchange="document.registrar.provincia.value=this.options[this.selectedIndex].value; if (this.options[this.selectedIndex].value=='<%= r2("provincia") %>') { Element.hide($('provinciasnoes'));Element.show($('provinciases')); } else { Element.show($('provinciasnoes'));Element.hide($('provinciases')); }" name="provincia" class="boton" onclick="this.setAttribute('style','');"> <option value="" selected="selected">Seleccione provincia</option> <% Do While Not r2.EOF %> <Option VALUE="<%= r2("provincia") %>"><%= r2("provincia") %></Option> <% r2.MoveNext Loop r2.Close conexion.Close %> </select> <% set conexion=server.createobject("ADODB.connection") basedatos3="DRIVER=Microsoft Access Driver (*.mdb);DBQ="&Server.MapPath("/kyu21/Db/peluqueria.mdb") conexion.open basedatos3 sql="select * from localidad where localidad order by localidad asc" set r3=conexion.execute(sql) %> <select novalid="true" onchange="document.registrar.localidad.value=this.options[this.selectedIndex].value; if (this.options[this.selectedIndex].value=='<%= r3("localidad") %>') { Element.hide($('provinciasnoes'));Element.show($('provinciases')); } else { Element.show($('provinciasnoes'));Element.hide($('provinciases')); }" name="localidad" class="boton" onclick="this.setAttribute('style','');"> <option value="" selected="selected">Seleccione Localidad</option> <% Do While Not r3.EOF %> <Option VALUE="<%= r3("localidad") %>"><%= r3("localidad") %></Option> <% r3.MoveNext Loop r3.Close conexion.Close %> </select> <% set conexion=server.createobject("ADODB.connection") basedatos4="DRIVER=Microsoft Access Driver (*.mdb);DBQ="&Server.MapPath("/kyu21/Db/peluqueria.mdb") conexion.open basedatos4 sql="select * from datos where nombre order by nombre asc" set r4=conexion.execute(sql) %> <select novalid="true" onchange="document.registrar.centro.value=this.options[this.selectedIndex].value; if (this.options[this.selectedIndex].value=='<%= r4("nombre") %>') { Element.hide($('provinciasnoes'));Element.show($('provinciases')); } else { Element.show($('provinciasnoes'));Element.hide($('provinciases')); }" name="centro" class="boton" onclick="this.setAttribute('style','');"> <option value="" selected="selected">Seleccione Centro</option> <% Do While Not r4.EOF %> <Option VALUE="<%= r4("nombre") %>"><%= r4("nombre") %></Option> <% r4.MoveNext Loop r4.Close conexion.Close %> </select> <script language="Javascript"> <!-- for (var i=0;i<document.registrar.comunidad.options.length;i++) { if (document.registrar.comunidad.options[i].value == '') { document.registrar.comunidad.options[i].selected = true; } } for (var i=0;i<document.registrar.provincia.options.length;i++) { if (document.registrar.provincia.options[i].value == '') { document.registrar.provincia.options[i].selected = true; } } for (var i=0;i<document.registrar.localidad.options.length;i++) { if (document.registrar.localidad.options[i].value == '') { document.registrar.comunidad.options[i].selected = true; } } for (var i=0;i<document.registrar.centro.options.length;i++) { if (document.registrar.centro.options[i].value == '') { document.registrar.centro.options[i].selected = true; } } TC(document.registrar.tipo); //--> </script> <input name="mostrar" type="button" id="mostrar" value="Mostrar" /> </form> </body> </html>