cxdy
PHP Developer
- Jun 8, 2014
- 100
- 27
Hey, so I'm working on this script.
The data changes every 3-5 minutes, and I'm not sure how to automatically update it.
The only workaround I have right now is to run it in an iframe, and have the page refresh every 10 seconds. I don't really like that approach.
Is there a way using AJAX or jQuery that I can reload just the php script every few seconds?
What I've tried:
Along with different variations of that.
The script that I'm trying to refresh can be found here:
Anyone have any ideas? Thank you.
The data changes every 3-5 minutes, and I'm not sure how to automatically update it.
The only workaround I have right now is to run it in an iframe, and have the page refresh every 10 seconds. I don't really like that approach.
Is there a way using AJAX or jQuery that I can reload just the php script every few seconds?
What I've tried:
Code:
function refresh(){
$('#lastfm').load('index.php');
}
setInterval( "refresh()", 10000 );
Along with different variations of that.
The script that I'm trying to refresh can be found here:
You must be registered for see links
Anyone have any ideas? Thank you.