How can I have live info on a page without refreshing?

By: Francesco Brogi | Asked: 01/11/2024
ForumsCategory: How-toHow can I have live info on a page without refreshing?
Francesco Brogi asked 7 months ago
Hi everyone,  I've got a list of entries in a view and I want to be able to show the value of a specific field in real time without having to refresh the page or clicking a button.  To be more specific, my form has a status field ("Claimed" or "Not claimed"). I want the status to be shown on the list of entries for each one of them in case it is "Claimed". But in order for me to see if someone else updated one of the entries, I need to refresh the page. I don't want to do that. I want to be able to see the change in realtime, without having to refresh the page or click a button.  I hope this makes sense.  Any help would be appreciated, thank you! Francesco
1 Answers
Rob LeVineRob LeVine answered 7 months ago
Given your list of tags, I'm guessing you already know the answer. You'll need to set up a timer w/jQuery and make ajax calls to get the values and then update the UI.
Francesco Brogi replied 7 months ago

<p>Thank you Rob! I can see what I need to do but I am finding it hard to start from scratch with the code.</p>

Francesco Brogi replied 6 months ago

Any suggestions?

Rob LeVineRob LeVine replied 6 months ago

I suggest searching for keywords such as "jquery (or javascript), execute function repeatedly " or something similar. That's the "hard part", though it really shouldn't be that hard. Here's one example - https://www.tutorialrepublic.com/faq/how-to-call-a-function-repeatedly-after-fixed-time-interval-in-jquery.php

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right