Page is a not externally linkable
- Code, Content, and Presentation
-- JavaScript and AJAX
---- What's the javascript for target=" blank"?


rocknbil - 5:00 pm on May 10, 2010 (gmt 0)


<span onmouseover="this.style.cursor='pointer'" onclick="clickTrack(); return false;" onMouseDown="clickTrack(); return false;">


Just don't use span, use an anchor. You have a bunch of code there not needed to force the span to do what you want when an anchor does this inherently.

Example [webmasterworld.com] (so the user knows it's a new window - but you will need to remove the target attribute.)

Not mentioned here is the pain of popup blockers, the previous example addresses that as well.

There are very good reasons to use a new window, many times they are not good reasons and indeed invalid, so the original source is STILL spot on. Some things don't change.

It's also interesting that target is coming back in HTML5.

[edited by: rocknbil at 5:04 pm (utc) on May 10, 2010]


Thread source:: http://www.webmasterworld.com/javascript/4125487.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com