Forum Moderators: open

Message Too Old, No Replies

Targeted Links in XHTML?

<a href="" TARGET=""> not allowed, what now?

         

davidbraun

10:47 am on Feb 23, 2005 (gmt 0)

10+ Year Member



This has probably been asked before, but anyway:

The XHTML-Specs do not allow me to target a link to another window (like, <a href="this.html" target="that">bummer</a>)

...

How would I then open a link into a different window (except using JS)?

Thanks already
david

Robin_reala

12:33 pm on Feb 23, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You don't. I believe your only option is JS, but as it's an accessibility problem I usually don't bother opening in new windows any more.

davidbraun

12:54 pm on Feb 23, 2005 (gmt 0)

10+ Year Member



That's too bad.

I wouldn't bother neither, but my clientele does...

At the moment, I content myself with faulty code, but will "develop" a little script that allows opening in new windows without creating an accessibility issue. (I once had such a thing, so it won't be too much of a development...

encyclo

12:58 pm on Feb 23, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can use the target attribute in XHTML, just that you can't when using XHTML 1.0 Strict. The Transitional doctype, however, includes target, and is therefore the most suitable doctype for your needs.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

There are a few Javascript "solutions", all of which miss the point entirely.

Robin_reala

6:27 pm on Feb 23, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



david - when I said it was an accessiblity issue I was talking about the act of opening a new window, not the target attribute.

[w3.org ]

10.1 Until user agents allow users to turn off spawned windows, do not cause pop-ups or other windows to appear and do not change the current window without informing the user. [Priority 2]

davidbraun

9:20 pm on Feb 23, 2005 (gmt 0)

10+ Year Member



HM. I see... I obviously had/have an incomplete undrstanding of "accessibility" (I've never dived into the matter and only had a "general-overview-understanding" of and quite personal view to), so it looks like it is time to do my homework... as a starter, I see the point...

But I do not undersand enciclos point that current JS-approaches "totally miss the point"? I mean, if opening stuff in new windows isn't appropriate anyway, what other point could be missed then?

ah, and, apologies for this quirky english...