Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- function miFuncion() {
- var fewSeconds = 5;
- $("#enviarBoton").prop("disabled", true);
- $("#enviarBoton").css("opacity", "0.3");
- $.ajax({
- method: "post",
- contentType: "application/json",
- url: "cogerRespuesta",
- data: JSON.stringify({"nombre": $("#nombre").val()}),
- dataType: 'json',
- success: function (datos) {
- alert(datos.nombre);
- setTimeout(function () {
- $("#enviarBoton").prop("disabled", false);
- $("#enviarBoton").css("opacity", "1");
- }, fewSeconds * 1000);
- //$("#muestraTexto").html(datos.nombre);
- $("#muestraTexto").load("prueba.xml");
- },
- error: function (e) {
- console.log("ERROR " + e);
- }
- });
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement