09-23-2016, 08:31 PM
it works! thanks a lot!
an issue I see is that somehow my page gets refreshed every 5 seconds. Is that a supposed behavior?
In addition, I changed one phrase in your code to be:
$.post(<?=$us_url_root?>+"users/helpers/logoutcheck.php", {loginstatus:$("#loginstatus").text()},
instead of this:
$.post("users/helpers/logoutcheck.php", {loginstatus:$("#loginstatus").text()},
I noticed this because I had all my pages under usersc folder instead of users folder. so when I'm at my pages the setInterval function gets redirected to users/users/helpers/logoutcheck.php instead of users/helpers/logoutcheck.php. Please let me know if this is a proper fix.
an issue I see is that somehow my page gets refreshed every 5 seconds. Is that a supposed behavior?
In addition, I changed one phrase in your code to be:
$.post(<?=$us_url_root?>+"users/helpers/logoutcheck.php", {loginstatus:$("#loginstatus").text()},
instead of this:
$.post("users/helpers/logoutcheck.php", {loginstatus:$("#loginstatus").text()},
I noticed this because I had all my pages under usersc folder instead of users folder. so when I'm at my pages the setInterval function gets redirected to users/users/helpers/logoutcheck.php instead of users/helpers/logoutcheck.php. Please let me know if this is a proper fix.