View Full Version : target attribute
dabbler
07-12-2003, 02:37 PM
How do I get a link to open in a new window using XHTML Strict where the "target" attribute is not allowed?
I suppose I could go back to transitional, but I would like to use strict if I could. I have an small image which is a link to a larger version of the image, and I want it to open in a new window, without Javascript etc.
Any help please?
animgirl
07-12-2003, 04:55 PM
Hey,
I use strict on my page and throw in a chunk of Javascript like this:<a href="http://www.example.com/" onclick="window.open('http://www.example.com/','_blank');
return false;">Example Link</a>
But you said you didn't want to use Javascript.
There are also some other alernatives on this site (http://faq.ozoneasylum.com/834/rating/).
animgirl
dabbler
07-13-2003, 01:51 AM
Thanks, Animgirl, for the help.
I suppose I'll use the Javascript solution, at least for now, - I don't really want to fall back on Transitional.
I know it wasn't the most basic of questions, but I still consider myself a newbie, so........
dreuby
07-14-2003, 02:29 AM
Why isn't "target" allowed in strict? I would have thought it was something most web builders would want to use quite often.
cbkihong
07-14-2003, 02:47 AM
The W3C believes the target attribute is biased towards specific media (that is, GUI browsers) and thus not "accessible" enough.
vBulletin® v3.7.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.