Reputation: 33431
I have the following hyperlink:
<a name="top"></a>
My button looks like this:
<span id="listControl_1_ctl15" onclick="window.location='#top'" class="TextButton">
<span class="button_left"></span>
<span class="button_text">Bovenaan</span>
<span class="button_right"></span>
</span>
My page doesn't navigate to the top section. Does anyone know why?
Upvotes: 1
Views: 102
Reputation: 2337
put this on what you call the top:
<a name="top"></a>
and then you can use this to go to the link
<a href= "#top"> go to the top </a>
if you want to go to the top of the whole page you can use this also:
<a href = #> TOP! </a>
stefan.
Upvotes: 4
Reputation: 5933
Use window.location.hash
:
<span id="listControl_1_ctl15" onclick="window.location.hash='top'" class="TextButton">
<span class="button_left"></span>
<span class="button_text">Bovenaan</span>
<span class="button_right"></span>
</span>
Upvotes: 3