0
Hello everyone wanted to get a specific area of what this coming from the other page for example what comes from the other page I get the div with id as I would do this with my script?
<script type="text/javascript">
// Função responsável por atualizar as frases
function atualizar()
{
// Fazendo requisição AJAX
$('#mensagensinbox').load("functions/atumensainbox.php?id_log_ass=<?php echo $id_log_ass; ?>");
}
// Definindo intervalo que a função será chamada
setInterval("atualizar()", 10000);
// Quando carregar a página
$(function() {
// Faz a primeira atualização
atualizar();
});
</script>
Now that I’ve remembered rsrs the load inside it I can put the id of the div for example $('#mensagensinbox'). load("functions/atumensainbox.php? id_log_ass=<? php echo $id_log_ass; ? > #essadiv");
– gezer
Yes, but I believe in the same way, the return of the contents of
load
will continue to be the entire content of the page functions/atumensainbox.php. You must pick up the content after return. UPDATE - If you use the # you only take the content of that identifier.– Andrew Ribeiro
solved he just got the div he really wanted got top now.
– gezer
Interesting...
– Andrew Ribeiro
for example now it looks like $('#mensagensinbox'). load("functions/atumensainbox.php? id_log_ass=<? php echo $id_log_ass; ? > #messages"); calling another part $('#mensagensvalinbox'). load("functions/atumensainbox.php? id_log_ass=<? php echo $id_log_ass;? > #totalmessages");
– gezer