Ver Mensaje Individual
  #8 (permalink)  
Antiguo 01/09/2010, 16:31
churretin
 
Fecha de Ingreso: abril-2010
Ubicación: Extremadura
Mensajes: 128
Antigüedad: 14 años
Puntos: 2
Respuesta: mostrar tabla al pulsar registro de uan tabla padre

y esto me genera firebug cuando pulso una de los campos y me aparece llos datos que quiero mostrar pero arriba, y no debajo de esa linea sin que destartale la taba por completo


html xmlns="http://www.w3.org/1999/xhtml"><head>



<style type="text/css">
.ocultar {display:none;}
.mostrar {display:block;}
.sel {color:#FF0000;}
.nosel {color:#000000;}
</style>
<script type="text/javascript">
var visto_subm = null;
var visto_color = null;
function ver(num) {
objhl = document.getElementById(num);
obj = document.getElementById("sub"+num);

obj.className = (obj==visto_subm) ? 'ocultar' : 'mostar';
objhl.className = (objhl==visto_color) ? 'nosel' : 'sel';

if ((visto_subm != null) &amp;&amp; (visto_color != null)) {
visto_subm.className = 'ocultar';
visto_color.className = 'nosel';
}

visto_subm = (obj==visto_subm) ? null : obj;
visto_color = (obj==visto_color) ? null : objhl;
}

</script>
</head><body>

<div id="sectores">
<label class="subcabezeras">Actividad de la empresa</label>
<div style="z-index: 1;" class="mostar" id="sub0"><input type="checkbox" value="1" id="check_sub" name="check_sub[]"><label>Abastecimiento de agua</label><input type="checkbox" value="3" id="check_sub" name="check_sub[]"><label>Abono orgánico</label><input type="checkbox" value="5" id="check_sub" name="check_sub[]"><label>Aceite de oliva</label><input type="checkbox" value="7" id="check_sub" name="check_sub[]">
......................................mucho de esto repetio........................................
<type="checkbox" value="349" id="check_sub" name="check_sub[]"><label>Camiones grúa</label><input type="checkbox" value="351" id="check_sub" name="check_sub[]"><label>Carpintería pvc</label><input type="checkbox" value="353" id="check_sub" name="check_sub[]"><label>Casetas de obra</label><input type="checkbox" value="355" id="check_sub" name="check_sub[]"><label>Cerramientos metálicos</label><input type="checkbox" value="/" id="check_sub" name="check_sub[]"><label></label></div><div style="z-index: 1;" class="ocultar" id="sub9"><input type="checkbox" value="/" id="check_sub" name="check_sub[]"><label></label></div><div style="z-index: 1;" class="ocultar" id="sub10"><input ></label></div><div style="z-index: 1;" class="ocultar" id="sub21"><input type="checkbox" value="/" id="check_sub" name="check_sub[]"><label></label></div><div style="z-index: 1;" class="ocultar" id="sub22"><input type="checkbox" value="/" id="check_sub" name="check_sub[]"><label></label></div><div style="z-index: 1;" class="ocultar" id="sub23"><input type="checkbox" value="/" id="check_sub" name="check_sub[]"><label></label></div><div style="z-index: 1;" class="ocultar" id="sub24"><input type="checkbox" value="/" id="check_sub" name="check_sub[]"><label></label></div><div style="z-index: 1;" class="ocultar" id="sub25"><input type="checkbox" value="/" id="check_sub" name="check_sub[]"><label></label></div><div style="z-index: 1;" class="ocultar" id="sub26"><input type="checkbox" value="/" id="check_sub" name="check_sub[]"><label></label></div><div style="z-index: 1;" class="ocultar" id="sub27"><input type="checkbox" value="/" id="check_sub" name="check_sub[]"><label></label></div><div style="z-index: 1;" class="ocultar" id="sub28"><input type="checkbox" value="/" id="check_sub" name="check_sub[]"><label></label></div><div style="z-index: 1;" class="ocultar" id="sub29"><input type="checkbox" value="/" id="check_sub" name="check_sub[]"><label></label></div><div style="z-index: 1;" class="ocultar" id="sub30"><input type="checkbox" value="/" id="check_sub" name="check_sub[]"><label></label></div><div style="z-index: 1;" class="ocultar" id="sub31"><input type="checkbox" value="/" id="check_sub" name="check_sub[]"><label></label></div><div style="z-index: 1;" class="ocultar" id="sub32"><input type="checkbox" value="/" id="check_sub" name="check_sub[]"><label>type="checkbox" value="/" id="check_sub" name="check_sub[]"><label></label></div><div style="z-index: 1;" class="ocultar" id="sub37"><input type="checkbox" value="/" id="check_sub" name="check_sub[]"><label></label></div><table border="0">
<tbody><tr><td></td><th><div style="z-index: 1;" onclick="ver(this.id)" class="sel" id="0">Agricultura y Ganadería</div></th><td></td><th><div style="z-index: 1;" onclick="ver(this.id)" class="nosel" id="1">Alimentación</div></th><td></td><th><div style="z-index: 1;" onclick="ver(this.id)" class="nosel" id="2">Animales y mascotas</div></th><td></td><th><div style="z-index: 1;" onclick="ver(this.id)" class="nosel" id="3">Arte</div></th><td></td><th><div style="z-index: 1;" onclick="ver(this.id)" class="nosel" id="4">Asesorías y despachos</div></th></tr><tr><td></td><th><div style="z-index: 1;" onclick="ver(this.id)" class="nosel" id="5">Bancos y cajas</div></th><td></td><th><div style="z-index: 1;" onclick="ver(this.id)" class="nosel" i1;" onclick="ver(this.id)" class="nosel" id="19">Mantenimiento</div></th></tr><tr><td></td><th><div style="z-index: 1;" onclick="ver(this.id)" class="nosel" id="20">Moda</div></th><td></td><th><div style="z-index: 1;" onclick="ver(this.id)" class="nosel" id="21">Muebles</div></th><td></td><th><div style="z-index: 1;" onclick="ver(this.id)" class="nosel" : 1;" onclick="ver(this.id)" class="nosel" id="27">Salud y medicina</div></th><td></td><th><div style="z-index: 1;" onclick="ver(this.id)" class="nosel" id="28">Seguridad</div></th><td></td><th><div style="z-index: 1;" onclick="ver(this.id)" class="nosel" id="29">Seguros</div></th></tr><tr><td></td><th><div style="z-index: 1;" onclick="ver(this.id)" class="nosel" </td><th><div style="z-index: 1;" onclick="ver(this.id)" class="nosel" id="36">Vehículos</div></th><td></td><th><div style="z-index: 1;" onclick="ver(this.id)" class="nosel" id="37">Viajes</div></th></tr></tbody></table>





<!--

<div id="0" class="nosel" onclick="ver(this.id)" style="z-index:1;">MENU0</div>
<div id="sub0" class="ocultar" style="z-index:1;">
SubMenu0<br />
SubMenu0<br />
SubMenu0
</div>

<div id="1" class="nosel" onclick="ver(this.id)" style="z-index:1;">MENU1</div>
<div id="sub1" class="ocultar" style="z-index:1;">
SubMenu1<br />
SubMenu1<br />
SubMenu1
</div>


<div id="2" class="nosel" onclick="ver(this.id)" style="z-index:1;">MENU2</div>
<div id="sub2" class="ocultar" style="z-index:1;">
SubMenu2<br />
SubMenu2<br />
SubMenu2
</div>


<div id="3" class="nosel" onclick="ver(this.id)" style="z-index:1;">MENU3</div>
<div id="sub3" class="ocultar" style="z-index:1;">
SubMenu3<br />
SubMenu3<br />
SubMenu3
</div>
-->
</div></body></html>