Ver Mensaje Individual
  #1 (permalink)  
Antiguo 17/02/2014, 18:00
Avatar de satjaen
satjaen
 
Fecha de Ingreso: septiembre-2012
Ubicación: Jaén (Andalucía)
Mensajes: 893
Antigüedad: 11 años, 8 meses
Puntos: 10
Enviar formulario con evento onblur

Hola, por favor necesito saber como puedo mandar el form6 del código que pongo con el evento onblur.

Código Javascript:
Ver original
  1. <script type="text/javascript">
  2. $(document).ready(function() {
  3.    
  4.     $('#form6').submit(function(event) {
  5.        
  6.             if (document.form6.edAveria.value.length==''){
  7. alert("¡Complete los campos!")
  8.        document.form6.edAveria.focus()
  9.        return 0;
  10. }
  11.     if (document.form6.TipoIntervencion.value.length==''){
  12. alert("¡Complete los campos!")
  13.        document.form6.TipoIntervencion.focus()
  14.        return 0;
  15. }
  16. if (document.form6.CodigoFinalizacion.value.length==''){
  17. alert("¡Complete los campos!")
  18.        document.form6.CodigoFinalizacion.focus()
  19.        return 0;
  20. }
  21.                 if (document.form6.edfecha.value.length==''){
  22. alert("¡Complete los campos!")
  23.        document.form6.edfecha.focus()
  24.        return 0;
  25. }
  26.  
  27.     if (document.form6.edfechaFin.value.length==''){
  28. alert("¡Complete los campos!")
  29.        document.form6.edfechaFin.focus()
  30.        return 0;
  31. }
  32.  
  33. if (document.form6.dtFecharecepcion.value.length==''){
  34. alert("¡Complete los campos!")
  35.        document.form6.dtFecharecepcion.focus()
  36.        return 0;
  37. }
  38.  
  39. if (document.form6.edHoraInicio.value.length==''){
  40. alert("¡Complete los campos!")
  41.        document.form6.edHoraInicio.focus()
  42.        return 0;
  43. }
  44.  
  45. if (document.form6.edHoraFin.value.length==''){
  46. alert("¡Complete los campos!")
  47.        document.form6.edHoraFin.focus()
  48.        return 0;
  49. }
  50.  
  51. if (document.form6.edTiempoIntervencion.value.length==''){
  52. alert("¡Complete los campos!")
  53.        document.form6.edTiempoIntervencion.focus()
  54.        return 0;
  55. }
  56.  
  57.      var datos = $(this).serialize();  
  58.       event.preventDefault()
  59.       $.ajax(
  60.         {
  61.             url:'ins_detatifac.php',
  62.             type:'POST',
  63.             data:datos,
  64.             beforeSend:function(objeto){
  65.                 $('#carga').css({display:'block'});
  66.             },
  67.             complete:function(){
  68.                 $('#carga').css('display','none');
  69.                 },
  70.             success: function(data) {
  71.                 $('#result').html(data);
  72.             }
  73.            
  74.            
  75.         });
  76.        
  77.     });
  78. });
  79. </script>



Y el textarea donde mandaría el formulario con onblur:

Código Javascript:
Ver original
  1. <textarea name="edAveria"  onblur="this.value=this.value.toUpperCase();v28(this.value, this.name);" cols="22" rows="8"><?php echo $row_Recordset2['edAveria']; ?></textarea>

Gracias