Solved

XHTML1 Strict: "Anchor targets new window" alternative

Posted on 2003-11-19
3
289 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

912 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