• Post Reply Bookmark Topic Watch Topic
  • New Topic

html:base and named anchors

 
Andles Jurgen
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using a page that dynamically creates links to named anchors in the same page. When I added the struts html:base tag to the page it stopped them from working. Probarbly because the html:base tag is causing the browser to fully qulaify my supposedly page relative named anchors? (such as #top and so on.)
What is the best way to get round this??
TIA
Andles
 
Andles Jurgen
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could somebody please answer this post if at all possible - still having no luck figuring it out.
Basically I am have built a list of links dynamically that looks like this when viewing the html source:
<a href="#1">Question 1 blah blah </a>
<a href="#2">Question 2 blah blah </a>
and so on ...
(it's an FAQ page with answers linking to questions with named anchors.)
The problem is that, when using html:base, the browser tries to resolve the links from the base path, so the browser no longer see them as simple named anchors.
Any help at all would be much appreciated.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!