Welcome to WebmasterWorld Guest from 18.104.22.168
Forum Moderators: incrediBILL
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]
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">).
Requesting a URL with a '#' is a two-step process: The browser requests the file (without a # or anything after it) from the server, then searches the returned file for the target anchor.
py9jmas: I am trying to send the html within an email message. I could change the anchor link to foo.html#Top - which would work.
The only thing is when the anchor is clicked on - instead of scrolling within the actual email message - a new window gets opened.
I would like scrolling within the email message to be achieved. Is there any way that this could be done?