View Full Version : Ability to advance through a series of images in ExtJS window

4 May 2011, 8:42 AM

I have a button in a grid cell that opens a window to display images. I would like to pass a list or object of multiple images that one can sequentially advance through in the window, perhaps with an 'advance button' symbolized by an arrow image. I want the viewer to see one image at a time in the window, perhaps with some descriptive text below each image.

Can anyone tell me how I go about doing something like this. I can hardcode a single image in the Ext.Window configuration, but I don't know how to pass in a group of multiple images that I can then advance through one at a time.



4 May 2011, 9:01 AM
I'd pull JSON from the server-side via an Ajax request, where the data would look something like this:

images: [{
imageUrl: 'pics/monkeys/pooFling.jpg',
text: 'This is a picture of a monkey flinging poo...'
imageUrl: 'pics/snakes/snakeByte.jpg',
text: 'Pics of snakes on a plane'
imageUrl: 'pics/aardvarks/antEater.jpg',
text: 'An Ant Eater eating what Ant Eaters eat...'
You'd then have a generic JSON array you could walk, where you could dynamically add/remove BoxComponents to/from the Window.

4 May 2011, 9:09 AM
Thank you friend,

I will try your suggestions and see how far I get!