Ver Mensaje Individual
  #3 (permalink)  
Antiguo 19/01/2004, 15:56
Avatar de KarlanKas
KarlanKas
Moderador extraterrestre
 
Fecha de Ingreso: diciembre-2001
Ubicación: Madrid
Mensajes: 6.987
Antigüedad: 22 años, 5 meses
Puntos: 61
Si quieres que si se selecciona el tercero y se escribe algo y luego se cambia de opinión y se selecciona cualquier a de los dos anteriores se vuelva al valor inicial prueba este ejemplo:
Código PHP:
<html>
<
head>
    <
title>Untitled</title>
    <
script>
    
valorInicial="Hola pepe"
    
function empezar(){texto23=document.forms[0].elements[3]
    
texto23.value=valorInicial;}
    
</script>
</head>

<body onload="empezar()">
<form     name="enviar" 
        method="POST" 
        action="pagina2.htm">

        OPCION1
<input     type="radio" 
        onclick="texto23.disabled=true;texto23.value=valorInicial" 
        name="texto" 
        value="texto1"><br>
        OPCION2
<input     type="radio" 
        onclick="texto23.disabled=true;texto23.value=valorInicial" 
        name="texto" 
        value="texto2"><br>
        OPCION3
<input     type="radio" 
        onclick="texto23.disabled=false;" 
        name="texto">

<input     disabled="disabled" 
        type="text" 
        name="texto" 
        >
</form>

</body>
</html> 
__________________
Cómo escribir

No hay pregunta tonta, sino tonto que quiere seguir en la ignorancia.