0
I am mounting a page that is inserted 2 values. These values go to a page .php
via AJAX
and then the page returns all records from the database.
Function that registers the data:
function adiciona(){
var os = $('#icon_telephone').val();;
var descricao = $('#icon_prefix').val();;
$.ajax({
type: 'POST',
url: 'adiciona.php',
dataType : 'html',
data: {descricao: descricao, os:os},
success: function(data) {
$("#carrega").show();
$("#carrega").hide();
console.log(data);
exibe();
},
error: function(xhr, desc, err){
console.log(xhr);
console.log(desc);
console.log(err);
$('#notification-bar').text("Details: " + desc + "\nError:" + err);
}
});
}
Function retrieving the data:
function exibe(){
$.ajax({
type:'POST',
dataType : 'html',
url: 'exibe.php',
success: function(data2){
console.log("dados fun 2"+data2);
$('#tabeladados').text(data2);
// $('#tabeladados').off();
// $('#tabeladados').text(data2);
// $("#tabeladados").on('load', 'button.actionButton', exibe());
},
error: function(xhr, desc, err){
console.log(xhr);
console.log(desc);
console.log(err);
$('#notification-bar').text("Details: " + desc + "\nError:" + err);
}
});
}
Problem:
The exit is normal. All the data I need is returned, but the css style of the page is not applied to these returned elements, as the example below: