Personal oops, all right?
Next, I'm doing an administrative area and would like the content to dynamically update without the need to refresh the page to see if it has anything new. For example, if the administrator is on the order page and enters a new order, I would like the table to already update and display this new order, without having to load the page to see if there is anything new.
Or if you are not on the order page, you would see a notification, as you have here in stackoverflow or facebook, etc.
I tried to look for something like this, but for now I did not find anything. The languages I am using are: PHP (database), JSON (pass the infos from the database to the site), Jquery / AJAX to make things dynamic and HTML / CSS.
I have the functional codes to read the DB, create the JSON, write the tables on the website etc. I just could not do these dynamic updates and notification system, no need to refresh.
Can anyone help me with this? How to begin? Any referral link for me to learn this? I know a bit of Jquery / Ajax, but nothing advanced.
Thank you.
Edit: I've been searching and found this code in Jquery:
var $container = $("#mytable");
var refreshId = setInterval(function()
{
$container;
console.log("loaded");
}, 10000);
But it is not working. It loads the div, the console shows that it was loaded, but the table does not update with the new values.