Ver Mensaje Individual
  #4 (permalink)  
Antiguo 05/05/2009, 06:39
quimfv
Colaborador
 
Fecha de Ingreso: marzo-2008
Ubicación: Sabadell
Mensajes: 4.897
Antigüedad: 16 años, 2 meses
Puntos: 574
Respuesta: Select e Input

Código HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Documento sin t&iacute;tulo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
function miraselect(obj){
if (obj.value=="Otros"){
 document.getElementById("Otro").style.display="block";
 }else{
 document.getElementById("Otro").style.display="none";
 }
}
</script>
</head>
<body>
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="175px" height="50px" valign="middle">
<select name="Tipo" id="Tipo" onChange="miraselect(this)">
  		<option value="Comercial">Comercial</option>
  		<option value="Productos">Productos</option>
  		<option value="Envio y Transporte">Envio y Transporte</option>
  		<option value="Cuenta Premium">Cuenta Premium</option>
  		<option value="Otros">Otros</option>
      	  </select></td>
    <td width="175px" height="50px" valign="middle">
<input name="Otro" type="text" id="Otro" style="display:none"></td>
  </tr>
</table>
</body>
</html> 
Fijate en la diferencias....

(getElementById luego los elements tienen que tener id!!!)

Quim