I don't think this is a JS question as you can do hash anchors in html href
code.
I think you will find that if you put a <a name="#hashname"></a> in IE it
will work and in netscape it won't (new versions of NS might work).
IE is more intelligent than netscape so works out bad code and does work.
The answer is, in the <a name="anchorname"></a>, miss out the hash (#) and
this will work in all browsers. Only on the link that goes to that
page/section of the page do you put the hash symbol.
<a href="page.html#intro">link</a>
<a name="intro"></a> Your intro text.
This will work in all browsers.
Hope that helps.
Stu
"Yimin Rong" <yi*******@yahoo.ca> wrote in message
news:af**************************@posting.google.c om...
Does anyone know if there are any browsers where you must specify "#"
as a prefix when setting the hash for the location?
For example, the following would move to the intro section of the
document:
window.location.hash = "#intro";
But in the same browser, this would not work:
window.location.hash = "intro";
So far, in the browsers I've tested, the "#" seems to be optional. If
this behaviour is compliant, any references, on-line or otherwise,
would be welcome.
Thanks,
Yimin Rong