Javascript Does Not Call File
I am trying to use the solution called in here: How to keep session alive without reloading page? Unfortunately I can't get it to work, I have very limited experience with Javascri
Solution 1:
I don't know why, but after copy-paste your javascript code – I've got strange characters in Code Snipped. It can be charset problem. Code looks good, but bracket only looks like bracket. It's not bracket. What it is? I don't know, but look at that what I've got in Code Snipped after pasting your code:
Code will execute if you write it using good charset. Take that working code:
setInterval(function(){
$.post('refresh_session.php');
alert("dsa");
}, 5000);
<scriptsrc="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
By the way – alert
is of course only test, you can delete this.
So, the answer is – check your charset.
Post a Comment for "Javascript Does Not Call File"