Línea 5: |
Línea 5: |
| <script> | | <script> |
| function ObtenerTexto() { | | function ObtenerTexto() { |
− | if (0 < $(".maintext").val().length) { | + | if (0 < $(".maintext").val().length) { |
− | $(".statistics").text('Procesando. Ten paciencia....');
| |
− | var a = new XMLHttpRequest;
| |
− | a.onreadystatechange = function() {
| |
− | 4 == a.readyState && 200 == a.status && ($(".statistics").text(a.responseText))
| |
− | };
| |
− | var b = new FormData;
| |
− | b.append("textParameter", $(".maintext").val());
| |
− | a.open("POST", "/cgi/ejemplo.py");
| |
− | a.send(b)
| |
| | | |
| //legibilidadfield field part | | //legibilidadfield field part |
− | $(".legibilidadfield").val('Procesando. Ten paciencia....'); | + | $(".crawfordfield").val('Procesando. Ten paciencia....'); |
− | var c = new XMLHttpRequest; | + | var crawfordfieldA = new XMLHttpRequest; |
| c.onreadystatechange = function() { | | c.onreadystatechange = function() { |
− | 4 == c.readyState && 200 == c.status && ($(".legibilidadfield").val(c.responseText)) | + | 4 == crawfordfieldA.readyState && 200 == crawfordfieldA.status && ($(".crawfordfield").val(crawfordfieldA.responseText)) |
| }; | | }; |
− | var d = new FormData; | + | var crawfordfieldB = new FormData; |
− | d.append("textParameter", $(".maintext").val()); | + | crawfordfieldB.append("textParameter", $(".maintext").val()); |
− | c.open("POST", "/cgi/legibilidadField.py"); | + | crawfordfieldB.append("fieldParameter", "crawfordfield"); |
− | c.send(d) | + | crawfordfieldA.open("POST", "/cgi/fieldPost.py"); |
| + | crawfordfieldA.send(crawfordfieldB) |
| | | |
− | //nivel field part | + | |
− | $(".nivelfield").val('Procesando. Ten paciencia....');
| |
− | var e = new XMLHttpRequest;
| |
− | e.onreadystatechange = function() {
| |
− | 4 == e.readyState && 200 == e.status && ($(".nivelfield").val(e.responseText))
| |
− | };
| |
− | var f = new FormData;
| |
− | f.append("textParameter", $(".maintext").val());
| |
− | e.open("POST", "/cgi/nivelField.py");
| |
− | e.send(f)
| |
− | | |
| | | |
| | | |