django-recaptcha2
django-recaptcha2 copied to clipboard
Reload on ajax
How to reload this plugin after ajax request?
$('#id_input').keyup(function(e){
let url = index_url;
$.ajax({
type: "POST",
url: url,
data: {
'input': $('#id_input').val(),
'offer_type': $('#id_offer_type').val(),
'category': $('#id_category').val()
},
success: function (data) {
$('#offer-objects').html(data);
},
complete: function(){
SwiperReload();
},
});
});
Something like that. If recaptcha is inside div with ID offer objects (#offerobjects) it does not load after ajax request finished (inside success function).
Any ideas?
I think that the real problem is the activation from the google script. Did you tried to use the explicit version and to call the activation call after the ajax update?