Solved

XHTML1 Strict: "Anchor targets new window" alternative

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Little bit of help styling my heading 3 32
One field not displaying content (ASP Classic) 8 31
innerHTML 7 35
Angular won't showing my array result in HTML 3 29
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
Find out what you should include to make the best professional email signature for your organization.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
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…

820 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