|    
			
				10/01/2013, 10:18
			
			
			  | 
  |   |  |  |  Fecha de Ingreso: noviembre-2012 Ubicación: Monzón 
						Mensajes: 157
					 Antigüedad: 12 años, 11 meses Puntos: 0 |  | 
  |   Respuesta: validación formulario 
  si no he entendido mal me dices que no hace falta que ponga nada en 'action' para comprobar mediante javascript que el formulario funciona perfectamente;entonces me puedes decir si la funcion que hice para poner ciertas condiciones en los elementos del formulario funciona bien? saludos...
 
 function validacion(){
 valor = document.getElementById("nombre").value;
 if(valor==null || valor.length==0 || /^\s+$/.test(valor)){
 alert('No se puede dejar vacío');
 return false;
 }
 valor = document.getElementById("apellido1").value;
 if(valor==null || valor.length==0 || /^\s+$/.test(valor)){
 alert('No se puede dejar vacío');
 return false;
 }
 valor = document.getElementById("apellido2").value;
 if(valor==null || valor.length==0 || /^\s+$/.test(valor)){
 alert('No se puede dejar vacío');
 return false;
 }
 valor = document.getElementById("telefono").value;
 if( isNaN(valor) ) {
 alert('Introduce un valor numérico');
 return false;
 }
 valor = document.getElementById("email").value;
 if( !(/\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)/.test(valor)) ) {
 alert('La dirección de email no es válida');
 return false;
 }
 valor = document.getElementById("mensaje").value;
 if(valor==null || valor.length==0 || /^\s+$/.test(valor)){
 alert('Debes de dejar tu mensaje');
 return false;
 }
 elemento = document.getElementById("aceptar_condiciones");
 if( !elemento.checked ) {
 alert('Debe aceptar las condiciones');
 return false;
 }
 return true;
 }
     |