Widget:Test Legible

De CNB
Ir a la navegación Ir a la búsqueda
Busca en cnbGuatemala con Google

<button type="submit" id="calcular">Analizar</button>

<script> function ObtenerTexto() {

   if (0 < $(".maintext").val().length) {       
      //legibilidadfield field part
       $(".crawfordfield").val('Procesando. Ten paciencia....');        
       var crawfordfieldA = new XMLHttpRequest;
       c.onreadystatechange = function() {
           4 == crawfordfieldA.readyState && 200 == crawfordfieldA.status && ($(".crawfordfield").val(crawfordfieldA.responseText))
       };
       var crawfordfieldB = new FormData;
       crawfordfieldB.append("textParameter", $(".maintext").val()); 
       crawfordfieldB.append("fieldParameter", "crawfordfield");    
       crawfordfieldA.open("POST", "/cgi/fieldPost.py");
       crawfordfieldA.send(crawfordfieldB)
      
       


   }

}

document.getElementById("calcular").addEventListener("click", function(a) {

    ObtenerTexto();
    a.preventDefault()

});


</script>