Open a New Browser Tab With JavaScript

I just came across this entry over at Larry Williams’ Blog explaining how to open a link in a new tab. Pretty interesting, and kudos to Larry for figuring this out. It just seems to me that there should be a way to do with without JavaScript. Wouldn’t that be more usable?

I mean, there are special names to use in the target to do things such as open a new window (_blank), open in a parent window (_parent), etc. IE and Mozilla also provide the _search value to open links in the search sidebar. Wouldn’t it make sense for Mozilla to support a value like _tab to open a link in a new tab? That way, it would fail gracefully in non-supporting browsers by opening a new window instead.

Understanding JavaScript Promises E-book Cover

Demystify JavaScript promises with the e-book that explains not just concepts, but also real-world uses of promises.

Download the Free E-book!

The community edition of Understanding JavaScript Promises is a free download that arrives in minutes.