Forum Moderators: open
Is it possible to have the browser window automatically scroll down to where I was when I clicked the link?
I think I have seen this on ebay and probably elsewhere but cannot recall those sites.
Any advice is appreciated. TIA.
<a href="/some/page.html#far_down" name="far_down" id="far_down">
This is far down the page
</a>
So there are two parts to this.
First you need to identify a location on the page where you want to take the visitor. You can do it with <a name="" id=""> clause. Or you can just set an id="" attribute to any HTML element on the page.
The second part is the link itseld. You want to add the anchor name to the end of the page name. E.g. page.html#far_down.
I could have implemented this using just a little bit of javascript to control the answer visibility. However, we want to track which questions are being clicked, hence the need for php/mysql