
25/04/2003, 10:03
|
 | Moderador | | Fecha de Ingreso: enero-2002
Mensajes: 8.031
Antigüedad: 23 años, 3 meses Puntos: 98 | |
mmhhh entonces necesitas un script client side, ve al foro de javascript, a lo mejor te dan una idea, a mi se me ocurre algo así a ver si te sirve:
function muestracampos()
{
switch(document.theform.asuntos.value)
{
case "1":
theform.asunto1.style.visibility= 'visible';
theform.asunto2.style.visibility= 'hidden';
break;
case "2":
theform.asunto1.style.visibility= 'visible';
theform.asunto2.style.visibility= 'visible';
break;
}
function ocultacampos()
{
theform.asunto1.style.visibility= 'hidden'
theform.asunto2.style.visibility= 'hidden'
}
<form action=# method=post name=theform>
<select name=asuntos onchange= "muestracampos();">
<option value=1>Uno</option>
<option value=2>Dos</option>
</select>
<br>
<input type=text name="asunto1">
<br>
<input type=text name=asunto2>
<script language=javascript>
ocultacampos()
</script>
</form>
__________________ "El hombre que ha empezado a vivir seriamente por dentro, empieza a vivir más sencillamente por fuera."
-- Ernest Hemingway |