Ver Mensaje Individual
  #9 (permalink)  
Antiguo 10/01/2012, 12:45
Avatar de emprear
emprear
Colaborador
 
Fecha de Ingreso: junio-2007
Ubicación: me mudé
Mensajes: 8.388
Antigüedad: 16 años, 10 meses
Puntos: 1567
Respuesta: Mi boton enviar no funciona en firefox

Entonces el problema esta en tu javascript y/o php, un ejemplo de validación muy básica con javascript, debería funcionar asi

Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <title>titulo</title>
  5. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  6. <script type="text/javascript">
  7. function validar(){
  8. var camponombre = document.getElementById('nombre').value;
  9. if(camponombre == ""){
  10. alert('falta el nombre');
  11. return false;
  12. }
  13. }
  14. </head>
  15. <div>
  16. <form action="enviar.php" method="post" onsubmit="return validar();">
  17. <p>
  18. <label for="nombre">Nombre</label>
  19. <input type="text" id="nombre" name="nombre" />
  20. <br />
  21. <input type="submit" value="procesar" />
  22. </p>
  23. </form>
  24. </div>
  25. </body>
  26. </html>

con respecto al html del form, me refiero a
cerrar valores de atributos entre comillas
cerrar los options
si asignas for en los labels, hacerlo a un id Existente , pais no es igual a Pais

Saludos
__________________
La voz de las antenas va, sustituyendo a Dios.
Cuando finalice la mutación, nueva edad media habrá
S.R.