Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

156
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!