0

I'm looking for a PHP/AJAX slideshow solution that reads in images from a directory and auto updates while playing when photos are added or deleted. The images should also auto size to the browser dimensions. I have searched for hours and haven't found anything that auto updates. The topic at Ajax slideshow does not show anything is nice but it uses a meta refresh tag which is not dynamic. I know how to adjust this with PHP to dynamically generate the appropriate refresh time on each cycle but this is not ideal with a page refresh. Any suggestions on how to approach this problem is greatly appreciated.

Community
  • 1
  • 1
techguy817
  • 31
  • 1
  • 5

2 Answers2

0

Did you tried with something like this ? Jquery examples

Personally I love this library.

Russo
  • 301
  • 3
  • 12
0

I would set a timer window.setInterval(yourfunction, 10000); and when timer reaches 0 fire it again after grabbing new picture. You can have a callback in the same function it is way easier.

function yourfunction(){window.setInterval(yourfunction, 10000); alert("HELLO");}

For the picture either I would get the list on a table in the script or dynamically load a php page(1st easier if you have all the pictures from a folder, 2nd easier if it loads from database)

MayTheSchwartzBeWithYou
  • 1,181
  • 1
  • 16
  • 32