circlemaker
08-23-2004, 11:33 AM
Hello,
I'm new to javasccript and can't work out how to do the following. I need to ensure that a number of images are displayed per line on a page (4). However, I will not know how many images will be returned from a db.
I am using XSL to get the images and then adding them to a javascript array. This works fine i.e I can return and add 6 images to my array. However, with this scenario I would need to display 4 images on one 1 and then 2 on the next. What I can't work out is how to loop through the array dividing it up so that it displays the correct amount.
I would be grateful to anyone who could offer any advice/links to a script etc that handles this sort of thing. I have looked on a number of sites but don't really know what sort of category this would be under.
Thanks in advance
circlemaker.
I'm new to javasccript and can't work out how to do the following. I need to ensure that a number of images are displayed per line on a page (4). However, I will not know how many images will be returned from a db.
I am using XSL to get the images and then adding them to a javascript array. This works fine i.e I can return and add 6 images to my array. However, with this scenario I would need to display 4 images on one 1 and then 2 on the next. What I can't work out is how to loop through the array dividing it up so that it displays the correct amount.
I would be grateful to anyone who could offer any advice/links to a script etc that handles this sort of thing. I have looked on a number of sites but don't really know what sort of category this would be under.
Thanks in advance
circlemaker.