Ver Mensaje Individual
  #4 (permalink)  
Antiguo 15/10/2008, 14:57
Avatar de the_web_saint
the_web_saint
 
Fecha de Ingreso: mayo-2008
Ubicación: localhost/tierra/america/panama
Mensajes: 1.229
Antigüedad: 16 años
Puntos: 43
Respuesta: Habilitar/Deshabilitar un combo mediante un checkbox.

Aquí está compañer@, no es distinto a lo que te dije. Solo debias unir las dos cosas.

Código PHP:
     
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml">
<
head>
<
meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<
title>Untitled Document</title>
<
script>
function 
deshabilita()
{
    if(
document.getElementById('derivar').checked)
    {
        
document.getElementById('derivado_usuario').disabled=false;
    }
    else
    {
        
document.getElementById('derivado_usuario').disabled=true;
    }
}
</script>
</head>

<body>
<input type="checkbox" name="derivar" id="derivar" value="ON" onclick="deshabilita()">

<br/>

<select name="derivado_usuario" id="derivado_usuario" disabled>
             
   <option value=" " selected></option>
   <option value="opcion1">opcion1</option>
   <option value="opcion2">opcion2</option>

</select>
</body>
</html> 
__________________
..::The Saint::..
El pesimista se queja del viento; el optimista espera que cambie; el realista ajusta las velas.