View Full Version : Loading a first image in album
SteveC
10-08-2007, 02:10 PM
Script: DD PHP Photo Album script
Script URL: http://www.dynamicdrive.com/dynamicindex4/php-photoalbum.htm
I am using this script in a site and it's working fine with the image displaying on the same page in a div.
at the moment the Image area is empty when the page loads, is it possible to show the first item in the album by default when the page loads?
Thanks
boogyman
10-08-2007, 02:45 PM
the link doesn't work
SteveC
10-08-2007, 10:30 PM
the link doesn't work
Sorry about that I've replaced the link.
jscheuer1
10-09-2007, 04:38 AM
If you have an image display area, something like so:
<div id="loadarea"></div>
You can just place the code for your initial image in it:
<div id="loadarea"><img src="first_big.jpg"></div>
You can put any HTML in there that you like. It will be replaced once the user loads something else in there.
SteveC
10-09-2007, 11:53 AM
Thanks so much for the prompt reply.
Your solution is what I'm using at the moment
What I would really like to do is load the first image in the gallery array into the display area. so that if I change the contents of the array the first image of the new array will load dynamically.
jscheuer1
10-09-2007, 04:56 PM
I thought you said it was empty. Anyways, you could put a document.write() statement in there, something like:
<div id="loadarea"><script type="text/javascript">
document.write('<img src="'+imagepath+galleryarray[0]+'">');
</script></div>
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.