[thelist] href=# versus href=JavaScript.....

rudy r937 at interlog.com
Thu Feb 22 02:01:43 CST 2001


> The alternative is to place the javascript function call in the
> href, but this can give you funky results in older or non-JS-enabled
> browsers, if I recall. The #null approach avoids that.

hi james

that's really interesting

as the javascript protocol is misunderstood by some early browsers, another
good html solution goes a little further than just one common <a
name=top></a> target for all such links, and makes a separate target for
each which is located just ahead of where the link is

for example

    <a name=foo></a>
    <h4>Foo</h4>
    <a href="#foo" onClick=".....">something</a>
    .
    <a name=bar></a>
    <h4>Bar</h4>
    <a href="#bar" onClick=".....">something</a>

so that if the page *does* move it doesn't move far, and certainly not to
the top (or bottom -- some browsers scan to the end to find an anchor that
isn't there)


rudy





More information about the thelist mailing list