How about preloading the thumbnails and maybe the first large image ,
then as someone clicks a thumbnail, start pre-loading the next.  If
its a lightbox type arrangement your next button could trigger a
preload of the next.

On May 27, 4:25 pm, Matt Thomson <[email protected]> wrote:
> Thats a good idea, and it would solve my problem, except that I
> simplified my problem a bit in the post, so the example just got to
> the gist of the matter.
>
> The thumbs load a big image, and the big image click loads a lightbox,
> so that solution kinda puts the problem back a step, as the question
> of how to get the lightbox src comes up.
>
> On May 27, 4:06 pm, "Aaron Cooper" <[email protected]> wrote:
>
> > Is loading the big images into a directory, and having each thumb href (or
> > onclick event) load the respective full image onto the page not an option?
>
> > Seems to me that it's the usual way an image gallery is handled.
>
> > Cheers
> > Aaron
>
> > ----- Original Message -----
> > From: "matt_thomson" <[email protected]>
> > To: "NZ PHP Users Group" <[email protected]>
> > Sent: Wednesday, May 27, 2009 4:01 PM
> > Subject: [phpug] Putting the images in the html, but stopping the browser
>
> > from requesting them?
>
> > > I have already brought this up in a mootools group, but If anyone here
> > > has any smart ideas, they are much appreciated.
>
> > > I have a photo gallery that will display about 50 thumbnails. When
> > > thumbnail #1 is clicked, big image number 1 is displayed and so on...
>
> > > Ideally I would like to put all the thumbs in one div (as <img
> > > src="..), and all the big images in another div (as <img src="..
> > > style="display; none" />)
>
> > > Then I could (with mootools) grab all the big images as an array
> > > (getElements), grab the thumbs as an array, and do an each loop
> > > through the thumbs. So if thumbsImageArray[index] is clicked on,
> > > bigImageArray[index] is shown.
>
> > > All pretty simple, except that I don't want 50 big images to load
> > > right away, and "display: none" does not stop the browser from
> > > requesting them from the server.
>
> > > I am thinking I may have to make a seperate json bit, and load all the
> > > big image info (src, width,height) as arrays/objects, then access
> > > these arrays with the mootools. This would work, but ideally I would
> > > love to have all my data nice and cleanly put in the HTML, do a
> > > getElements, do an each loop, sorted.
>
> > > Does anyone know of a way to stop the browser requesting the image,
> > > and still having the correct src in the html. I don't want an
> > > incorrect src, as it will result in 50 unnesscessary server calls.
>
> > > Thanks,
>
> > > Matt.
--~--~---------~--~----~------------~-------~--~----~
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]
-~----------~----~----~----~------~----~------~--~---

Reply via email to