PDA

View Full Version : Show/hide layer from dynamic link


tux
03-08-2007, 10:03 PM
Hi all,

I have been given the task of upgrading our camera club website. This is my first attempt at dynamic websites, I'm not doing bad for a newbee thanks to this forum. I have managed to populate a gallery page with a photographers thumbnails using an ID passed from the URL. What I'm stuck with is that I want to show the larger images on the same page by showing and hiding a layer contains the larger image, when the thumbnail is clicked. The thumbnails are populated on the page using a repeat region and recordset paging. I can show/hide layers using the behaviours but how can I do this dynamically showing the layer with the correct image each time. Hope this makes sense. Thanks for any help and ideas. Regards

Paul

chriskq
03-09-2007, 12:24 AM
you mean like this?

http://www.ourbridge.com.au/Gallery.aspx

see how the larger version of the image opens inside the same page (that way you dont need a new page for each largeImage)

just some css and javascript is acheiving this.

chriskq
03-09-2007, 12:27 AM
ps i think ur throwing around the term dynamic a little too much there.

dynamic is very backend server side stuff.

and can make the user perceive things are happening 'dynamic' just by using client side code like i mentioned above.

tux
03-09-2007, 06:02 AM
Hi Chris,

Thanks for replying. Yes, thats the type of thing. In Dreamweaver I only have the single image holder with the src coming from the database using the request string from the URL then repeating with a server behaviour. So how do I get this to work on the detail page, ie. create the link on the thumbs etc. so that each one has a different link when viewed in the browser. Hope this makes sense. Thanks again.

Paul

chriskq
03-10-2007, 10:08 AM
sry database isnt my forte' yet. Im just xhtml/css/javascript n some php.

lux
03-10-2007, 03:11 PM
one solution i would suggest is to wrap each image displayed in the repeat region with 'a' tags which link to another page that will show the full size image.

within the link include the image id so it will be passed in the url and then get that value on the page that displays the full size image.

hope that helps

tux
03-10-2007, 03:18 PM
Thanks Lux,

I'll give it a go this evening and let you know how I get on.

Regards

Paul

tux
03-11-2007, 09:51 PM
Hi Lux,

Great suggestion, thanks.

What I ended up doing was sending the imageID & the photographerID with the URL. I could then re populate the page with the thumbs as well as displaying the selected image on the same page.

The problem I have now is that you can select each thumb and display its main image until you click next on the repeat region, recordset paging. Once the page reloads with the next set from the region, when you select a thumb, the image displays, but the thumbs revert to the first set from the previous repeat region.

Any idea how I can fix this. Thanks.

This is the link to the gallery so you can see what I mean.

www.paultuckerphotography.co.uk/gallery.asp (http://www.paultuckerphotography.co.uk/gallery.asp)

Regards, Paul