Forum Moderators: open

Message Too Old, No Replies

Ye olde Photo Gallery question

posting clicked thumb on a new page with prev/next buttons

         

Don_Hoagie

5:54 pm on Feb 3, 2006 (gmt 0)

10+ Year Member



Surely things like this have been covered before... there are alot of tuts on the web too, but it all seems to be too involved for my liking. I'm looking for a simpler solution.

What i'm basically looking for is quite simple: have the clicked thumbnail of the gallery load into a new page rather than simply loading the image file, and have that page also contain "prev" and "next" buttons to get to the other images in the gallery. My image naming conventions are numerical (001.jpg, 002.jpg), so i imagine any function that simply counts up or down would be able to make the prev/next buttons work. Unfortunately my skills are lacking big-time with JS, so between this function and the one that will load the correct image based on what thumbnail you click, i'm stuck.

I've already coded the gallery pages and this new photo page that will allow for the prev/next functions, so i'm just looking for the JS at this point; not a whole tutorial on how to archive your photos into a database, which seems to be what most of the tuts are about.

Thanks for any assistance

Matt Probert

6:25 pm on Feb 3, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Why bother with Javascript? (if you don't need to)

The free application "MyAlbum" will produce HTML photo albums with all these features in pure HTML for you, automatically.

Matt

Bernard Marx

6:50 pm on Feb 3, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



...and require a separate HTML doc for every image too. A simple server-side script would provide that kind of behaviour much more easily.

There's no reason we can't supply a neater interface with some client-side script, but with a fallback.

Don, I started on an example, but, on re-reading I'm not exactly sure what you're after.

You have a page of thumb nails...
Click on one -> go to a new page for full image - with "prev", "next" buttons.

Is that the thing? (not a pop-up?)

Don_Hoagie

7:34 pm on Feb 3, 2006 (gmt 0)

10+ Year Member



Right on the money Bernard... strangely, I had written that in my OP, then removed it for some reason. Maybe i like confusing people.

Yeah, just sending to a new page. Like i said, i've already done that page- just used a bit of CSS to style the content and to z-index the prev/next buttons. A server-side script would be cool with me too, in fact I prefer PHP actions over JS... but i'm not too handy with either.