KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Am trying to refresh data stored in a div every 10 seconds using jQuery. My HTML code is: <!DOCTYPE html> <head> <title>Untitled Document</title> <script src="http://code.jquery.com/jquery-latest.js"></script> <script> $(document).ready(function(){ setInterval(function() { $("#latestData").load("getLatestData.php #latestData"); }, 10000); }); </script> </head> <body> <div id = "latestData"> </div> </body> </html> And the PHP code I am using (temporarily as I know this won't change due to the same "data"): <?php echo "test"; ?> However, it isn't even showing "test" on the html page.. could anyone suggest where I have gone wrong? Many thanks
Tags (comma-separated)
Save Edits
Cancel