Internal (same document) hyperlinks/named anchors not working IE9 HTML5
-
Monday, July 02, 2012 3:51 AM
Hello All,
I've been trying to get these internal hyperlinks working, internal as in... the same document, and hyperlinks as in anchors.
I have tried several times and just seem to going round in circles...
I have defined the named anchors as follows...
<body class="MyGroupCanvas"> <form id="Form1" runat="server"> <a id="AbsolutePageTop"> </a>
The anchor in this case is named 'AbsolutePageTop'
I have defined it with and with out the non breaking space but it just seems to actually go to the named anchor and then the page bounces back to the link which i clicked that is supposed to take me to the anchor in question...
The code that takes me to the anchor is as follows below...
<div class="MyTopicFooter">
[<span class="InlineBackLink" onclick="window.location.href=('#QuickLinks')">Quick Links</span>]
[<span class="InlineBackLink" onclick="window.location.href=('#AbsolutePageTop')">Top of Page</span>]
</div>This used to work fine with HTML4.xx but with HTML5 its driving me crazy!!
I have declared the doctype as follows...
<!DOCTYPE html>
And was wondering if this has anything to do with it?
As I read somewhere online that when chaanging the doctype to XHTML 1.0 it works fine,
Although I havnt tested that theory I believe it will work and used to work when using HTML4.xx and XHTML 1.0 doctype....
The crazy thing is....
If I click and HOLD the mouse button on the link to the anchor...
Then everything works fine....
Does this mean that the issue is actually NOT the source code but something to do with the Browser engine? TRIDENT?
Thank you for looking,
Also I'd be interested to know from the developers who are have problems with anchors if the anchors work if the long click (click and hold for about 1 or 2 seconds as opposed to click in a fraction of a second) the mouse button.
DocZaf
All Replies
-
Monday, July 02, 2012 5:07 AM
Hiya All,
I managed to fix it :D
The changes are below....
<div class="MyTopicFooter"> [<a class="InlineBackLink" href="#QuickLinks">Quick Links</a>] [<a class="InlineBackLink" href="#AbsolutePageTop">Top of Page</a>] </div>
DocZaf
- Marked As Answer by DocZaf Monday, July 02, 2012 5:07 AM


