Solved

XHTML1 Strict: "Anchor targets new window" alternative

Posted on 2003-11-19
3
286 Views
Last Modified: 2013-11-19
Hi there,

In using the XHTML1 Strict DTD, the anchor element's target attribute (<a target="_blank">) has been deprecated.
If we can't use Javascript, whats an alternative to popping up a new window?

Don't know if there is a solution using plain-old HTML or CSS, I know its possible with JScript, but what if the user-agent has JScript disabled?

Thanks
nD
0
Comment
Question by:nDorfin
  • 2
3 Comments
 
LVL 17

Accepted Solution

by:
dorward earned 250 total points
ID: 9777389
If you can't use JavaScript and you want to use Strict then there is NO WAY to force a new window on the user. New windows are not part of structure and therefore shouldn't be done with HTML (although obsolete markup can achieve the effect). New windows are certainly nothing to do with the way a page looks and are also impossible with CSS.

If you want to force new windows on users, use Transitional and the non-semantic target attribute, or use JavaScript (which is the correct tool for this sort of UI altering logic).

Better yet, let the *user* choose when they want to open a new window. <http://diveintoaccessibility.org/day_16_not_opening_new_windows.html>
0
 

Author Comment

by:nDorfin
ID: 9778302
Excellent site, thanks dorward - nice to see another perspective.
Sometimes I think new windows are needed, as u dont want to people to leave your site for another.  Sure, they can use the back-button, if they remember too, but your site is their focus.  Rather split the focus than change it.
0
 
LVL 17

Expert Comment

by:dorward
ID: 9778352
You might not want a visitor to leave, but if the visitor wants to go then they are not going to be happy when somebody tries to stop them. They have a back button, and bookmarks, and browser history record, and the option to open a link in a new window if they choose to.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now