This question refers to this sample page on my test site:
[URL=”http://www.twdesign.ca/up/display_tattoos_2009.php”]http://www.twdesign.ca/up/display_tattoos_2009.php
The following section of PHP code:
<table cellspacing=”0″ cellpadding=”0″ border=”0″ align=”right”>
<?php
while($row = mysql_fetch_row($result2))
{
$active = $row[0];
$imagenum = $row[1];
echo “<tr><td><a name=’placeholder$imagenum’ href=’display_tattoos_2009.php?in=$imagenum’ onClick=’swap(‘toppic’,’$imagenum’)’><img class=’opacity’ name=’$imagenum’ id=’$imagenum’ src=’tattoothumbnails/$imagenum.png’ width=’72’ height=’72’ alt=’$imagenum’></a></td></tr>n”;
}
?>
</table>
does what I want I want it to do on the page, displays a CSS controlled table on the side of the site to allow viewers to click on tattoo images and get a larger view, plus several other photos of the same tatoo from different angles.
What I’m having trouble with is that when the page reloads, the scrollbar automatically goes back to the top of the table and you have to scroll all the way down again to see the next tattoo.
I tried [B]changing the href
I tried using an [B]onLoad
<script type=”text/javascript”>
function goToAnchor() {
location.href = “display_tattoos_2009.php?in=$imagenum#placeholder$imagenum”;
}
</script>
using PHP to write the javascript and pass the variable, but again no luck.
I tried ouptutting the table as a form and using [B]FOCUS()
Maybe it’s the lack of sleep, maybe it’s that I’ve been looking at this code different ways for nigh on 24 hours now (interspersed with other projects to get my mind away form actively working on it), but I am at an impass.
Any help?