Hi,
At first excuse my for my - sometimes - crappy english.
I got a problem. I just started using jQuery, and it worked fine, but from the one to the other moment it stopped to give an alert of refresh the page.
Here is some code:
- <script src="http://code.jquery.com/jquery-latest.js"></script>
- <script>
- $(document).ready(function() {
- var refreshId = setInterval(function() {
- $.get("values.php", { v: "host_refresh" }, function(data){
- if(data == "refresh"){
- location.reload();
- }
- });
- }, 5000);
- });
- $(document).ready(function() {
- var refreshId = setInterval(function() {
- $.get("values.php", { v: "host_screenalert" }, function(data){
- if(data == "alert"){
- alert("SCREEN =D");
- }
- });
- }, 10000);
- });
- </script>
I've used firebug, and the answer i get from values.php?v=x is the same as what is in the if(data == "x").
So: The get is good. He just isn't alerting or refreshing..
If someone can help me,
Thanks in advance,
Robbin