When a user clicks the save button, I want all users currently in the page to be notified, or even better (or worse in a second thought) to enforce the page to refresh.
So, I tried this in my script:
function save_match() {
...
alert("Saved slot " + slot + "! :)");
window.location.reload();
}
but the refresh, of course, happens only for the user that actually pressed the button, the other users have no idea about the save the other user just made.
Enforcing the reload of the page seems a bit unlikely to happen, so what about doing something via JavaScript that would notify the other online users for the save incident?
Possible related question.
So, what I want is this:
function save_match() {
...
alert("Saved slot " + slot + "! :)");
// do something here so that all online users are updated!!
}