Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

150
Visualizações
How to update content in a page using webhook?

I'm trying to update content in an active loaded page using webhook response.

Earlier, I used to trigger the function using setTimeout for every 5 secs but noticed its kind of increasing server load. So, now whenever there is a change on the database a webhook will be triggered through which I will update the content on the loaded page without refreshing it.

But how do I tell a webhook URL to change/update content on another page.?

so far code goes as : PAGE#1:

<div id="loader_div">Some content</div>
<script>
function loadlink(){
    $('#loader_div').load('loading.php',function () {
         $(this).unwrap();
    });
}

loadlink(); // This will run on page load

setInterval(function(){
    loadlink() 
}, 5000); // this will run after every 5 seconds
</script>

loading.php

<p>some other content that i got from database</p>

Now the webhook URL is loading.php which gets the new update from the database, but how do I trigger the 'loadlink();' on the page1 without refreshing it and using set timeout..?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda