Reputation: 3680
I've got a page that links to an anchor:
<a name="1"></a>
with the link
<a href="examplepage.htm#1">Link</a>.
When I click on that link within the page the anchor's sitting on, it works as expected. But when I click on that link from another page, it loads the page at the point of the anchor as expected, but then reverts to the top of the page after a fraction of second.
No clue why, and all my research is fogged up by tutorials on how to link to the top of the page, the opposite of what I want to do!
Any help is much appreciated.
Thanks, Oli.
Upvotes: 1
Views: 146
Reputation: 4588
You are calling scroll()
in the onload
function!
<body class="LTR Safari Chrome Safari18 Chrome18 ENUS ContentBody" onload="scroll()">
Upvotes: 1