<a href="javascript:void()" onclick="window.open('myPage.aspx');">Open New Window</a>
Must do it. As others have noted, # tries to jump to a non-existent anchor, which will cause the browser to move up. You do not want to remove the href attribute because some browsers do not process <a> tags without href attributes as styling links, and you will need to define additional CSS rules to make the link look like other links to your site.
Also, why is there an href attribute, and then try to block the event, always returning false from your handler. In my opinion, this method is cleaner than the others offered here.
source share