Lee wrote:
[...]
The # is not a comment character. It's not a place holder.
It is a link to the top of the current page.
I don't think that is strictly correct. The HTML spec says
that an anchor specified with "#" must match an ID or NAME
attribute of an element, but that the anchor may be left
empty and completed with script later.
<URL:http://www.w3.org/TR/html4/struct/links.html#edef-A>
Therefore href="#" is valid HTML but the spec does not say
what a browser should do with it. However, most browsers
seem to interpret it as being the current document and
scroll to the top.
If you don't want to follow that link, your onclick handler
must return false:
onclick="createMyWindow();return false"
The anchor (href) should point to the URL that would be
opened in the new window by JavaScript if it were enabled.
If JavaScript is diabled, the user will be taken to the anchor
and not be left with a link that (maybe) just scrolls to the
top of the page:
<a href="http://www.google.com" onclick="
createMyWindow('http://www.google.com');
return false;">Go to Google</a>
--
Rob