- Fecha y hora:
- 23/05/2017 15:17:12 (hace 7 años)
- Branches:
- master, constituyente, estudiantes, general, plan_patria, sala
- Children:
- 8e6197e, 5a86f8c
- Parents:
- 2d9334e
- Fichero:
-
- 1 editado
Leyenda
- No modificado
- Añadido
- Eliminado
-
static/js/funciones.js
r4a10874 r9674858 808 808 809 809 /** 810 * Función que recarga la imágen del captcha, ***falta depurar*** 810 * @brief Función para recargar el captcha vÃa json 811 * @param element Recibe el botón 811 812 */ 812 $(document).ready(function() {813 $('.js-captcha-refresh').click(function(){814 //alert("xxxxx");815 /*$form = $(this).parents('form'); 816 $.getJSON( $(this).data('url'), {}, function(json) {817 // This should update your captcha image src and captcha hidden input818 });819 return false;*/820 location.reload(); 821 });822 } );813 function refresh_captcha(element) { 814 $form = $(element).parents('form'); 815 var url = location.protocol + "//" + window.location.hostname + ":" + location.port + "/captcha/refresh/"; 816 817 $.getJSON(url, {}, function(json) { 818 $form.find('input[name="captcha_0"]').val(json.key); 819 $form.find('img.captcha').attr('src', json.image_url); 820 }); 821 822 return false; 823 }
Nota: Vea TracChangeset
para ayuda en el uso del visor de conjuntos de cambios.