Ver Mensaje Individual
  #2 (permalink)  
Antiguo 13/04/2009, 08:15
FMB89
 
Fecha de Ingreso: abril-2009
Mensajes: 15
Antigüedad: 15 años, 11 meses
Puntos: 0
Respuesta: Checkbox con input

Fijate masomenos asi haber si te funciona...

Código PHP:
<STYLE>
    .hideable { position: relative; visibility: visible; }
</STYLE>

<script type="text/javascript">
    <!--
    function showMe (it, box) {
        var vis = (box.checked) ? "block" : "none";
        document.getElementById(it).style.display = vis;
    }
    //-->
</script>

<FORM NAME="form0">
    <TABLE>
        <?php
        
include ("configuracion.php");
                
        
$sql "SELECT * FROM servidores ORDER BY id";
        
$res do_sql($sql);
        
        
$i=0;
                
        while (
$row mysql_fetch_array($res)) {
            
$i++;
            
?>
            <TR>
                <TD VALIGN="top">                   *
                        <input type="checkbox" name="id_servidor[]"*onclick="showMe('div<?php echo $i ?>', this)" value="<?php echo $row['id_servidor']?>"><?php echo $ide?>
                        <br /> 
                </TD>
                <TD>
                    <DIV id="div<?php echo $i ?>" style="display: none">
                        <SPAN ID="contenido" CLASS="hideable">
                            Enlace: <INPUT TYPE='text' NAME='enlace_servidor' SIZE=15 MAXLENGTH=100>
                        </SPAN>
                    </DIV>
                </TD>
            </TR>
         <?php ?>
    </TABLE>
</FORM>