One of my small website projects requires weather data to be updated every 60 seconds on a webpage. I know I can do this with a page refresh / iframe, but I do not want to it this way. Is there any other way of geting this done? Jquery, Ajax, Flash??? The weather data is posted in a XML and TXT file.
Let me try to explain. I have a static webpage (index.html), and on this I want to update data every 60 seconds. The person looking at the page needs to see this updated data, but without him needing to refresh the page, or refreshing the page with a "<meta http-equiv="Refresh" content="60;URL=" />"
Ok, you have static page and in the static page you are importing and presenting data throught XML or Text file. I have used following script in one of my projects where i needed to refresh content of a .php file inside a div. Code: <html> <head> <script src=/path/to/jquery.js"></script> <script> $(document).ready(function() { $("#refreshcontainer").load("refresh.php"); var refreshId = setInterval(function() { $("#refreshcontainer").load('refresh.php?randval='+ Math.random()); }, 9000); }); </script> </head> <body> <div id="refreshcontainer"> </div> </body>