Bill Sullivan
asked on
Refresh a portion of a page every 10 seconds
Hi Experts!
I'm trying to get some customer testimonials to "scroll" on the front page of my website by calling survey results from my database. I would like these comments to scroll every 10 seconds. Can you help me with the code to do this? I've included the page I'm working on, and the lines I would like to refresh are found on lines 121 through 165. Thanks for your help!
index.php
I'm trying to get some customer testimonials to "scroll" on the front page of my website by calling survey results from my database. I would like these comments to scroll every 10 seconds. Can you help me with the code to do this? I've included the page I'm working on, and the lines I would like to refresh are found on lines 121 through 165. Thanks for your help!
index.php
ASKER
It appears that code would delay running the script for X seconds, but would not "refresh". Am I missing how setTimeout() works?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
There are a lot of discussions on the Internet in how to use setTimeout and its sister setInterval. The application you are describing is quite common. See if this solves your problem without having to deal with recursive calls to setTimeout.
http://manos.malihu.gr/slidebox-jquery-banner-rotator/
http://manos.malihu.gr/slidebox-jquery-banner-rotator/
ASKER
Thank you so much!
https://developer.mozilla.org/en-US/docs/Web/API/Window.setTimeout