Good morning everyone,
I have a question, I am making an Ajax request where I reload the contents of a Div and I put the answer, but I need to access the response that has been loaded with a jquery function, this file is linked to my project , but it does not execute the function that I need at the moment when the div is reloaded.
Function Code that updates the Div
$ ('# maker'). on ("change", function () {
if ($(this).val() == 0){
$.ajax({
type: 'POST',
url: '?c=index&m=queryAllReferences',
data: null
}).done(function (response) {
$('#responseQueryReferenceForMaker').load( response);
});
} else {
$.ajax({
type: 'POST',
url: '?c=index&m=queryReferenceForMaker',
data: {value: $(this).val()}
}).done(function (response) {
$('#responseQueryReferenceForMaker').html(response);
});
}
});
Code of the function in which I take the updated div info
$ ('# reference'). on ("change", function () {
alert($(this).val());
/*if($(this).val() == 0){
alert($(this).val());
$.ajax({
type: 'POST',
url: '?c=index&m=queryFunctionForReferenceDefault',
data: null
}).done(function (response) {
$('#resultQueryOnlyFunction').html(response);
});
} else {
$.ajax({
type: 'POST',
url: '?c=index&m=queryFunctionForReferenceIndexController',
data: {valueReference : $('#reference').val()}
}).done(function (response) {
$('#resultQueryOnlyFunction').html(response);
});
}*/
});