Msg#: 7984 posted 10:42 am on May 29, 2004 (gmt 0)
I am using base url within an HTML document - say http: //www.website.com/
I am also using anchors e.g <A name=Top></A> and later on down the HTML page <A href="#Top">Top of Page</A>
But the anchors are taken in relation to the base url and open a page "http://www.website.com/#Top". Is there a way for the base url to distinguishing between anchors within an HTML page and all other links?
Many thanks for an help received
[edited by: BlobFisk at 10:48 am (utc) on May 29, 2004] [edit reason] Delinked example URL [/edit]
Msg#: 7984 posted 11:21 am on May 29, 2004 (gmt 0)
By setting the base you are instructing the browser to resolve all urls relative to that base. The browser is doing exactly what you're telling it to do.
If the page this is happening on is "http://www.website.com/foo.html", your links would have to be <a href="foo.html#Top"> so when resolved relative to the base, you get the answer you first thought of. Or you could use absolute urls (ie <a href="http://www.website.com/foo.html#Top">).