AJAX + JQuery Question:

Associate
Joined
31 May 2005
Posts
2,178
Location
Alfreton,Derbyshire
I'm in the process of building a photo gallery, and have the basics working.

At the moment there are a number of thumbnails previews (6) and then a large image above, which then changes using CSS and Java Script. That works fine. The next step would be to use AJAX when clicking the >> arrow next to the thumbs for the next 6 images in the DB and when << is pressed the previous 6. I know how to do this if the page reloaded each time, but would like to do this using ajax, so the page doesn't need to reload and would make the navigating very friendly.

Currently, when the user clicks the thumbail Javascript appends the real image to the selected div.

Can anyone explain how I could retrieve the next and previous thumbs using ajax and then force them to reload? I have tried looking for some tutorials but have come up short? Any help or links would be appreciated.
 
Ok managed to find a little more, im guessing it's a case of building a php page that outputs xml for the ajax to pickup. Then i can delete and create new images as needed? Is it possible to pass an array back to the XMLHttpRequest? Rather than use xml? I suppose there may be adavntages to using xml, especially from a caching point of vue
 
Back
Top Bottom