//4 function validar(f){ if($("#nombre").val() =="") { alert("El nombre es obligatorio."); return false; } if($("#apellido").val() =="") { alert("El apellido es obligatorio."); return false; } var dni = $("#dni").val(); if (dni == 0) { window.alert("Ingrese un DNI/LC/LI."); return false; } else if (dni > 36000000) { window.alert("Se ingres� un DNI/LC/LI inv�lido."); return false; } if($("#fecha_nacimiento").val() =="") { alert("La fecha de nacimiento es obligatorio."); return false; } var radioSeleccionado = $('input[name=sexo]:checked', '#formulario_maraton').val(); if (radioSeleccionado == undefined) { window.alert("Seleccione un genero para continuar."); return false; } if($("#email").val() =="") { alert("La direccion de e-mail es obligatorio."); return false; } if($("#tel_cel").val() =="") { alert("El telefono es campo obligatorio."); return false; } if($("#direccion").val() =="") { alert("La direccion es campo obligatori."); return false; } if($("#ciudad").val() =="") { alert("La ciudad es campo obligatorio."); return false; } if($("#tipoCarrera").val() =="") { alert("El tipo de carrera es campo obligatorio."); return false; } if($("#talleRemera").val() =="") { alert("El talle de remera es campo obligatorio."); return false; } } //5 function selccCompetencia(){ if(flag!=1){ fecha_actual=new Date(); fecha_limite=new Date(); fecha_actual=new Date(fecha_actual.getFullYear(),fecha_actual.getMonth()+1,fecha_actual.getDate()); // fecha_actual=new Date(2017,05,21); //prueba fechaactual=fecha_actual.getTime(); fecha_limite=new Date(2017,06,09); fechalimite=fecha_limite.getTime(); fecha_con_recargo=new Date(2017,05,20); fechaconrecargo=fecha_con_recargo.getTime(); if(fechalimite 36000000) { window.alert("Se ingres�n un DNI/LC/LI inv�lido."); return; } var ajaxRequest = $.ajax({ url: "../examples/checkout-buttons/basic-preference/service_validarDNI.php", type: "post", data: "dni="+dni }); ajaxRequest.done(function(response) { var camo_error= document.getElementById('alerta_error'); if(response!='false'){ flag=1; $('#tipoCarrera').attr('disabled', false); document.getElementById("comunidad").value=response; document.getElementById("costo_total").value=250; camo_error.style.display = 'none'; }else{ flag=0; $('#tipoCarrera').attr('disabled', false); var campo_label_comunidad = document.getElementById('label_comunidad'); var campo_comunidad = document.getElementById('comunidad'); campo_comunidad.style.display = 'none'; campo_label_comunidad.style.display = 'none'; camo_error.style.display = 'block'; document.getElementById("costo_total").value=""; document.getElementById("alerta_error").innerHTML = "Si es miembro de la UTN Santa Fe (docente, no docente, graduado o estudiante) y el monto a pagar no tiene el descuento aplicado comuniquese a maraton@frsf.utn.edu.ar o presencialmente en la Secretaria de Relaciones Institucionales. "; } }); ajaxRequest.fail(function( jqXHR, textStatus ) { document.getElementById("costo_total").value=""; window.alert("Error: no se pudo conectar con el servidor."); }); }