See also Return to the Top 2
Here are couple of options on how to return to the top of a long page.
If you use a frameset where the content of your main frame is changed by links in another frame, then this script will allow you to use a link to return any page in the main frame to the top of the page.
The script is placed in a document that will appear in one of your other frames, ie, Your Nav frame or Header frame.
In my example frameset the script has been placed in the header page and the navbar page (just to show how it works) to return the documents in the main frame back to the top.
Copy the following into the <Head> section
<script type="text/javascript">
<!--
<!--Realised by apachejeff-->
function gotoTop(){
parent.main.window.scrollTo(0,0)
}
//-->
</script>
main is the name of the frame that this script will effect.
Change the name to suit your frame layout.
The link goes in the same document as the script.
NOTE;
You could do away with the script and just use <a href="#" onclick="parent.main.window.scrollTo(0,0)">Your Image or Text</a>
If you add "document.ondblclick=gotoTop" to the above script you could return to the top of the main frame page by double clicking the document body that contains this script no matter which frame it was in.
The link would not then be needed
<script type="text/javascript">
<!--
<!--Realised by apachejeff-->
function gotoTop(){
parent.main.window.scrollTo(0,0)
}
document.ondblclick=gotoTop
//-->
</script>
The above is a blend of "Return to the Top" and "Return to the Top 2"