I need a script that can grab pages via ajax and keep reloading the page every 10 seconds (or any other time i set). Does anyone know the script for this?
What pages? I mean, where the pages are located? How exactly do you wanna display those pages? Why ajax? Maybe an iframe will do the job just fine. I can ask tons of questions if you don't specify exactly what you need
I would like to load wwwDOTim1musicDOTnetSLASHonline-users101 (sorry i had to do that because it wouldnt let me add the link), but from three different sites. So theres actually three of them i need to load. I thought AJAX would be best to use because you dont have to refresh the page and what not, I dont know for sure whats the best way. At the moment I actually am using iframes to do it, I think AJAX will be better because instead of me constantly pressing refresh all the time it will update it for me.
You can use <iframe id='myiframe' src='http://google.com' onload="setTimeout('refresh()', 60000);"></iframe> Code (markup): where refresh is something like: function refresh() { document.getElementById('myiframe').src = document.getElementById('myiframe').src; } Code (markup): Really no need to use ajax here
If you use AJAX it's going to be pretty much the same thing. You'll just use a <div> instead of an <iframe>. There would be some slight changes, but I think the swift way to do it is with iframes. All AJAX is good for is just updating segments of server-side content - like a login or something. Of course other uses, but not the most efficient.