Forums

This topic is locked

Scroll bar in table cell

Posted 29 Apr 2005 07:41:42
1
has voted
29 Apr 2005 07:41:42 DAvid Griffiths posted:
First of all, thanks to all who have unwittingly helped me by helping others on the forums.

My current problem deals with a scroll bar in a table cell. The table holds an image gallery and is made up of three columns. Left column is site navigation bar, middle is full size image and right is thumbnails with a vertical scroll bar. The images are loaded dynamically from urls in a MySQL database. There are two recordsets on the page, one for the full image so it can be filtered to the one image using a URL parameter from a link tied to the thumbnails. The second recordset is for the thumbnails to allow all to be displayed in a repeating region. So far everything works beautifully....except whenever I load a new full size image by clicking on a thumbnail the scroll bar returns to the top. Seeing as how there are currently 70 images in the gallery this can get quite annoying. Is there a way to hold the scroll bar in place when the page is loaded with a new URL parameter for the main image?

Thanks in advance,

David

Replies

Replied 29 Apr 2005 12:48:17
29 Apr 2005 12:48:17 Wayne Hultum replied:
Hi david,

What type link are you using link to your big image? Is it a

a href="link"
or a
a href="#" onClick

regards
Wayne

Edited by - wayne1000 on 29 Apr 2005 12:58:26
Replied 29 Apr 2005 18:03:06
29 Apr 2005 18:03:06 DAvid Griffiths replied:
Wayne,

The link from the thumbnails is a standard link to the page with a URL parameter tacked on the end to filter the photos. i.e. The page is named gallery.asp and the thumnails contain a link that is "a href="gallery.asp?Image_ID=1#1"" The Image_ID changes obviously dependent on the thumbnail clicked and the anchor is set to the main photo to keep the page from reloading at the top of the page. If it is a simple matter of reformatting the link I will be eternally grateful. Thanks much.

David
Replied 29 Apr 2005 18:31:57
29 Apr 2005 18:31:57 DAvid Griffiths replied:
If it helps, here is the code for the cell is question.

<td width="105" rowspan="6"><div style="height:455px; width:100px; overflow:auto;">
<%
While ((Repeat1__numRows <> 0) AND (NOT rsthumbs.EOF))
%>
<table width="30">
<tr>
<td><a href="index.asp?Image_ID=<%=(rsthumbs.Fields.Item("Image_ID".Value)%>#1"><img src="<%=(rsthumbs.Fields.Item("Thumbnail_Path".Value)%>" border="0"></a></td>
</tr>
</table>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rsthumbs.MoveNext()
Wend
%></div></td>
Replied 29 Apr 2005 19:38:07
29 Apr 2005 19:38:07 Wayne Hultum replied:
is there a link I can have a look at?
Replied 29 Apr 2005 19:39:50
29 Apr 2005 19:39:50 DAvid Griffiths replied:
Wayne,

Unfortunately I don't have a live server for the site yet. Still in the development stage and haven't setup to server to host yet. Any more info I can provide? Thanks.

David
Replied 30 Apr 2005 05:34:42
30 Apr 2005 05:34:42 DAvid Griffiths replied:
Problem solved with a simple iframe to hold the main image in a separate document. Learning new things everyday.

Reply to this topic