Changeset 4ae1d12 in observatorio


Ignore:
Timestamp:
Jul 22, 2014, 5:24:22 PM (10 years ago)
Author:
Ing. Roldan Vargas <rvargas@…>
Branches:
master
Children:
c332f9f
Parents:
64255b8
Message:

agregada función para completar los digitos del camnpo cédula

File:
1 edited

Legend:

Unmodified
Added
Removed
  • procesos/media/js/ajax-request.js

    r547f39a r4ae1d12  
    6060    });
    6161}
     62
     63function reload_captcha(url) {
     64    $.getJSON(url, {}, function(datos) {
     65        if (datos.resultado) {
     66            $("#divImgcaptcha").html(datos.div_img_captcha);
     67            $("#imghash").val(datos.imghash);
     68        }
     69        else {
     70            alert(datos.error);
     71        }
     72    }).fail(function(jqxhr, textStatus, error) {
     73         var err = textStatus + ", " + error;
     74         alert( "Petición fallida. Verifique el error: " + err );
     75    });
     76}
     77
     78function completar_cedula(url, campo) {
     79    $.getJSON(url, {campo:campo}, function(){
     80        if (datos.resultado) {
     81            $("#cedula").val(datos.cedula);
     82        }
     83        else {
     84            alert(datos.error);
     85        }
     86    }).fail(function(jqxhr, textStatus, error) {
     87         var err = textStatus + ", " + error;
     88         alert( "Petición fallida. Verifique el error: " + err );
     89    });
     90}
Note: See TracChangeset for help on using the changeset viewer.