Ver Mensaje Individual
  #20 (permalink)  
Antiguo 11/09/2009, 18:40
Avatar de buzu
buzu
 
Fecha de Ingreso: octubre-2006
Ubicación: San Francisco, CA
Mensajes: 2.168
Antigüedad: 17 años, 7 meses
Puntos: 122
Respuesta: Antes de habilitar caja de texto debo llenar formulario

Mira, pongo esto:
Código html:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2.        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es">
  4.     <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  5.     <title>Untitled</title>
  6.     <script type="text/javascript">
  7.         window.onload = function(){
  8.             var descuento = document.getElementById('descuento');
  9.             descuento.onclick = function(){
  10.                 alert('descuento');
  11.             }
  12.         }
  13.     </script>
  14. </head>
  15.     <form name="" method="post" action="validar.php">
  16.         <p>
  17.             <input id="descuento" name="descuento" type="text" />
  18.         </p>
  19.     </form>
  20. </body>
  21. </html>

Al precionar en la caja de texto me lanza una alerta que dice 'descuento', eso es lo que hasta el momento tendría que hacer el tuyo.
__________________
twitter: @imbuzu