logo

New Response

« Return to the main article

You are replying to:

  1. What seems to work best for me is a subtle variation that combines both approaches (and so far, appears to work for me in just about any browser!). Try the following:

    <a href="javascript:void 0;" onClick="void window.open('/icons/vwicn012.gif', 'test', 'width=200,height=200');">How's this?</a>

    'void' requires an argument, but it doesn't care what, hence the 0). The reason I took this approach, is because it appears that some browsers (which ones escape me at the moment) follow the logic of "execute the onClick handler, then follow the link specified in the 'href' attribute." Having the 'void 0' statement in the href guarantees that the link doesn't "go anywhere."

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment: