[NTLK] Survey on opening images in new browser windows

Michael J. Hußmann michael at michael-hussmann.de
Sat Aug 14 19:52:41 EDT 2010


Morgan Aldridge (morgant at makkintosshu.com) wrote:

> The "_target" attribute went away for various reasons (accessibility,
> abuse, etc.), but the suggested method of working around this is with
> JavaScript. One web site I admin uses the add-event.js & popup.js
> scripts which make it to easily add JavaScript pop-ups by merely
> adding special commands in a "rel" attribute on the link. See
> <http://accessify.com/features/tutorials/the-perfect-popup/> for the
> full article incl. description of the problem, solution, downloads of
> the aforementioned scripts, and example usage.

The irony of this approach is that it creates a DOM that is exactly the
same as you would get by using the target attribute (target is outlawed
in HTML 4.01 strict but not in the DOM). It even lends itself to just
the same kind of abuse as the target attribute does. So it is just a
more convoluted and slower way of achieving the same end. But then, if
using target is evil, why should those JavaScript-based approaches be
any better? Or rather: if the HTML purists let you off the hook if you
go the JavaScript route, why should they make a fuss when you use target
which is simpler to use for you as the web developer and results in
pages loading faster which is a boon for your users?

- Michael


Michael J. Hußmann

E-mail: michael at michael-hussmann.de
WWW (personal): http://michael-hussmann.de
WWW (professional): http://digicam-experts.de




More information about the NewtonTalk mailing list