Forum Moderators: coopster

Message Too Old, No Replies

Help needed with scrolling

can I position my scrolling thumbnails

         

JWJonline

3:35 pm on Jul 7, 2006 (gmt 0)

10+ Year Member



I have made a small photo gallery in simple html but using php for include files and variable handling. I have a vertical column of thumbnails with a centrally displayed 'larger' image and accompanying text. It all works as I wnated except for one major issue. When a thumbnail is clicked, the screen refreshes to the newly selected image and the column of thumbnails resets back to the top.

Is there any way, using php, that I can force the column of thumbs to retain it's position or scroll it to the currently selected image?

the_nerd

8:34 pm on Jul 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



did you try to use anchors? - just use <a name = "mybookmark"> in your html-code before the picture that you want to be on top (i.e. the one that corresponds to the thumbnail that has been clicked on) - and add #mybookmark to the link: [mydomain.com...]

this assumes that you prepare the whole list dynamically.

JWJonline

8:34 am on Jul 8, 2006 (gmt 0)

10+ Year Member




I tried that. My code is currently of the form <a href="gallery/painting/pic1/"><img src="pic1-thumb.jpg"></a> repeated for each image. I tried putting an anchor inside the <a></a> and around it, in other words, both <a href="gallery/painting/pic1/"><a name="mybookmark"><img src="pic1-thumb.jpg"></a></a> and <a name="mybookmark"><a href="gallery/painting/pic1/"><img src="pic1-thumb.jpg"></a></a>. Should one of these worked?

the_nerd

10:45 am on Jul 8, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Not sure if you can nest one <a into the other one. Try to have the <a name = "..."> before the link, eg:

<a name = "actpic">
<a href = ".....">......</a>

this should work. Looking at it, you should also be able to use this:

<a name = "actpic" href = ".....">......</a>
(but I always used them separate - don't know why).

JWJonline

5:43 pm on Jul 8, 2006 (gmt 0)

10+ Year Member



Thanks for the suggestions but none of them work. I'm wondering if the SE-friendly url's are working against me in some way. Either that or I haven't explained myself very well. Is there any way I can post a link to the actual page?