By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,404 Members | 1,362 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,404 IT Pros & Developers. It's quick & easy.

DOCTYPE Strict and target="_blank"

P: n/a
For Strict DOCTYPEs, what's the recommended way to get
an anchor to open inside a new browser?

Thanks.

Jim Carlock
Post replies to the group.
Aug 18 '06 #1
Share this Question
Share on Google+
28 Replies


P: n/a
Jim Carlock <an*******@127.0.0.1wrote:
For Strict DOCTYPEs, what's the recommended way to get
an anchor to open inside a new browser?
Depending on the browser...

right-click Open in new tab
right-click Open Link in New Tab
right-click Open Link in New Window
right-click Open in New Window
Shift-click
right-click Open in background tab
Ctrl-Shift-click
middle-click
--
Darin McGrew, mc****@stanfordalumni.org, http://www.rahul.net/mcgrew/
Web Design Group, da***@htmlhelp.com, http://www.HTMLHelp.com/

politician n. one who double-crosses a bridge when he comes to it
Aug 18 '06 #2

P: n/a
Jim Carlock:
For Strict DOCTYPEs, what's the recommended way to get
an anchor to open inside a new browser?
<a href="url">link text</a>

--
Jock

Aug 18 '06 #3

P: n/a
Jim Carlock wrote:
For Strict DOCTYPEs, what's the recommended way to get
an anchor to open inside a new browser?
None. HTML 4 and up (except Transitional) leaves it to the user to
decide whether he wants to open a document in a new window, a new tab,
or the same window as the current document.
Aug 18 '06 #4

P: n/a

Jim Carlock wrote:
For Strict DOCTYPEs, what's the recommended way to get
an anchor to open inside a new browser?
If you really must, then a Transitional doctype.
If you're careful and you get the URL right, you can still get
non-quirky rendering.
Alternatively just let it be a minor invalidity.

Aug 18 '06 #5

P: n/a
On 18 Aug 2006, Andy Dingley wrote:
Alternatively just let it be a minor invalidity.
"a little bit pregnant"

Aug 18 '06 #6

P: n/a

"Andreas Prilop" <nh******@rrzn-user.uni-hannover.dekirjoitti
viestissä:Pi*************************************@ s5b004.rrzn.uni-hannover.de...
>Alternatively just let it be a minor invalidity.

"a little bit pregnant"
"slightly dead"
Aug 18 '06 #7

P: n/a
"Andy Dingley" <di*****@codesmiths.comwrote:
If you really must, then a Transitional doctype. If you're careful
and you get the URL right, you can still get non-quirky rendering.
Thanks, Andy. Would you have an example of the non-quirky
rendering? I see some browsers might not honor target="_blank",
but that's nothing I have control over as far as HTML encoding
goes, and some browsers might open a new tab instead of a new
browser window (effectively a new browser window as far I'm
concerned).

Do you happen to have any arguments against opening external
links from other websites in new Windows? I tend to think that
it's beneficial in the end for the end-user for informational pages
and documentation.
Alternatively just let it be a minor invalidity.Alternatively just let
it be a minor invalidity.
Going along these lines, would you or anyone else happen to
know of a reference that documents when browsers turn to
Quirks-Mode rendering?

I know, that's a far fetched request, but just in case someone holds
a good link to such...

Thanks.

Jim Carlock
Post replies to the group.
Aug 18 '06 #8

P: n/a
On 2006-08-18, Jim Carlock wrote:
For Strict DOCTYPEs, what's the recommended way to get
an anchor to open inside a new browser?
It is *not* recommended. Let the viewer decide whether to open the
link in a new window (or tab or whatever).

--
Chris F.A. Johnson <http://cfaj.freeshell.org>
================================================== =================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
Aug 18 '06 #9

P: n/a
Jim Carlock <an*******@127.0.0.1wrote:
Do you happen to have any arguments against opening external
links from other websites in new Windows? I tend to think that
it's beneficial in the end for the end-user for informational pages
and documentation.
Have you ever seen someone try to go back to the previous page, but the
browser's normal "back" function doesn't work because the link opened a new
window that covered the original one, and the user doesn't realize that
it's a new browser window?
Going along these lines, would you or anyone else happen to
know of a reference that documents when browsers turn to
Quirks-Mode rendering?
Like this? http://hsivonen.iki.fi/doctype/
--
Darin McGrew, mc****@stanfordalumni.org, http://www.rahul.net/mcgrew/
Web Design Group, da***@htmlhelp.com, http://www.HTMLHelp.com/

"If you loan $20 to someone you never see again, it was probably worth it."
Aug 18 '06 #10

P: n/a
"W˙rm" <no*************@north.invalidwrites:
"Andreas Prilop" <nh******@rrzn-user.uni-hannover.dekirjoitti
viestissä:Pi*************************************@ s5b004.rrzn.uni-hannover.de...
>>Alternatively just let it be a minor invalidity.

"a little bit pregnant"

"slightly dead"
"mostly harmless"

sherm--

--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
Aug 18 '06 #11

P: n/a
Dan

Jim Carlock wrote:
Do you happen to have any arguments against opening external
links from other websites in new Windows? I tend to think that
it's beneficial in the end for the end-user for informational pages
and documentation.
Why shouldn't I, as the end user with access to options (such as
right-click menus) to do this for myself make my own decision on this
instead of having it attempted to be forced upon me? Actually, I have
at least some of the browsers I regularly use configured to refuse
attempts to open new windows anyway, but that unfortunately sometimes
screws up the operation of complex "web applications" that depend on
interaction among multiple windows, and sometimes end up closing the
main window on me if I suppress the creation of new windows. To use
such things I have to go to a browser where I haven't set such a
configuration, and then I get annoyed by other sites that needlessly
open extra windows.

--
Dan

Aug 18 '06 #12

P: n/a
Jim Carlock wrote:
>
Do you happen to have any arguments against opening external links
from other websites in new Windows? I tend to think that it's
beneficial in the end for the end-user for informational pages and
documentation.
Apparently you weren't asking me; but since you posted your article to a
public newsgroup, I shall feel free to answer anyway.

I prefer to choose whether to replace, or to load a new window. If the
job's done for me by the URL, I'm deprived of that choice. And I'd
prefer not to have to decode the URL to decide what action I need to
take to have my preference executed; so if I want a new window, I always
ask for one.

It follows that if I get a new window without asking for one, that is
not something I wanted.
>
Going along these lines, would you or anyone else happen to know of a
reference that documents when browsers turn to Quirks-Mode rendering?
Did you mean me? Or am I an instance of "anyone else"?
Post replies to the group.
Good suggestion - that's what I usually do.
--
Jack.
http://www.jackpot.uk.net/
Aug 18 '06 #13

P: n/a
Sherm Pendley wrote:
"W˙rm" <no*************@north.invalidwrites:
>"Andreas Prilop" <nh******@rrzn-user.uni-hannover.dekirjoitti
viestissä:Pi************************************* @s5b004.rrzn.uni-hannover.de...
>>>Alternatively just let it be a minor invalidity.
"a little bit pregnant"
"slightly dead"
"mostly harmless"
"syntactically not the same as the others"
--
Jack.
http://www.jackpot.uk.net/
Aug 18 '06 #14

P: n/a
Jim Carlock wrote:
Do you happen to have any arguments against opening external
links from other websites in new Windows?
Browsers which support links that target new windows usually[1] provide a
user triggered method to open a link in a new window should the user want
it. They tend not to have methods which allow a user to prevent the link
from opening in a new window, nor anything which indicates (in an obvious
way) that the link will open a new window.

Unexpected new windows can confuse users, who may not release that a new
window has opened (and then wonder why the back button doesn't work).

[1] I don't know any exceptions
--
David Dorward <http://blog.dorward.me.uk/ <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Aug 18 '06 #15

P: n/a
In message <Hy*****************@reader1.news.jippii.net>, W rm
<no*************@north.invalidwrites
>"slightly dead"
Yeah, my day left me feeling like that, too.

--
Andy Mabbett
Say "NO!" to compulsory ID Cards: <http://www.no2id.net/>

Free Our Data: <http://www.freeourdata.org.uk>
Aug 18 '06 #16

P: n/a
In article <70************@xword.teksavvy.com>,
Chris F.A. Johnson <cf********@gmail.comwrote:
>On 2006-08-18, Jim Carlock wrote:
>For Strict DOCTYPEs, what's the recommended way to get
an anchor to open inside a new browser?

It is *not* recommended. Let the viewer decide whether to open the
link in a new window (or tab or whatever).
Why? There are situations, such as displaying "Help" information,
when it's clear that the information is required to be displayed at
the same time as the original page content. The Wikipedia editing
help window is a stellar example of this. I would *hate* if it
replaced the form I'm editing when I clicked Help and lost all my
edits. Wikipedia does inform you that the link will open a new
window, though.

-A
Aug 18 '06 #17

P: n/a
In message <ec**********@blue.rahul.net>, axlq <ax**@spamcop.netwrites
>Wikipedia does inform you that the link will open a new window, though.
Wikipedia lies, then.

--
Andy Mabbett
Say "NO!" to compulsory ID Cards: <http://www.no2id.net/>

Free Our Data: <http://www.freeourdata.org.uk>
Aug 18 '06 #18

P: n/a
On 2006-08-18, axlq wrote:
In article <70************@xword.teksavvy.com>,
Chris F.A. Johnson <cf********@gmail.comwrote:
>>On 2006-08-18, Jim Carlock wrote:
>>For Strict DOCTYPEs, what's the recommended way to get
an anchor to open inside a new browser?

It is *not* recommended. Let the viewer decide whether to open the
link in a new window (or tab or whatever).

Why? There are situations, such as displaying "Help" information,
when it's clear that the information is required to be displayed at
the same time as the original page content. The Wikipedia editing
help window is a stellar example of this. I would *hate* if it
replaced the form I'm editing when I clicked Help and lost all my
edits. Wikipedia does inform you that the link will open a new
window, though.
If you want it in a new window, *you* can tell your browser to open
it in a new window (or new tab). No one else should decide for you.

--
Chris F.A. Johnson <http://cfaj.freeshell.org>
================================================== =================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
Aug 18 '06 #19

P: n/a
In article <Z8**************@pigsonthewing.org.uk>,
Andy Mabbett <us**********@pigsonthewing.org.ukwrote:
>
>>Wikipedia does inform you that the link will open a new window, though.

Wikipedia lies, then.
Works for me. On every browser I try.

Seriously, do you really expect most users who are busy editing a
long CGI form to WANT their work to be wiped away and replaced by a
new window when clicking on a help link in that form? And do you
really expect the average web user to be savvy enough to right-click
on the link to open the help page in a new window?

-A
Aug 19 '06 #20

P: n/a
On 2006-08-19, axlq wrote:
In article <Z8**************@pigsonthewing.org.uk>,
Andy Mabbett <us**********@pigsonthewing.org.ukwrote:
>>
>>>Wikipedia does inform you that the link will open a new window, though.

Wikipedia lies, then.

Works for me. On every browser I try.

Seriously, do you really expect most users who are busy editing a
long CGI form to WANT their work to be wiped away and replaced by a
new window when clicking on a help link in that form?
Ofc ourse not; that's why they are able to tell the browser to open
a link in a new window or new tab.
And do you really expect the average web user to be savvy enough to
right-click on the link to open the help page in a new window?
The link should be accompanied by a note telling them to right
click (or whatever) to open it in a new window.

--
Chris F.A. Johnson <http://cfaj.freeshell.org>
================================================== =================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
Aug 19 '06 #21

P: n/a
Once upon a time *axlq* wrote:
In article <Z8**************@pigsonthewing.org.uk>,
Andy Mabbett <us**********@pigsonthewing.org.ukwrote:
>>
>>>Wikipedia does inform you that the link will open a new window, though.

Wikipedia lies, then.

Works for me. On every browser I try.

Seriously, do you really expect most users who are busy editing a
long CGI form to WANT their work to be wiped away and replaced by a
new window when clicking on a help link in that form? And do you
really expect the average web user to be savvy enough to right-click
on the link to open the help page in a new window?
Usually when using the back button you get back to the form and can
continue to fill it in.

The avarage web user can learn to right click and much more, if the
developer stop "helping" them. This wrong "help" is what keeping them
from learning the features of the browser.

--
/Arne

Proud User of SeaMonkey. Get your free copy:
http://www.mozilla.org/projects/seamonkey/
Aug 19 '06 #22

P: n/a
In message <ec**********@blue.rahul.net>, axlq <ax**@spamcop.netwrites
>In article <Z8**************@pigsonthewing.org.uk>, Andy Mabbett
<us**********@pigsonthewing.org.ukwrote:
>>
>>>Wikipedia does inform you that the link will open a new window, though.

Wikipedia lies, then.

Works for me. On every browser I try.
Let us know when you've tried every browser.
>Seriously, do you really expect most users who are busy editing a long
CGI form to WANT their work to be wiped away and replaced by a new
window when clicking on a help link in that form? And do you really
expect the average web user to be savvy enough to right-click on the
link to open the help page in a new window?
Seriously, do you think that's what I said?

--
Andy Mabbett
Say "NO!" to compulsory ID Cards: <http://www.no2id.net/>

Free Our Data: <http://www.freeourdata.org.uk>
Aug 19 '06 #23

P: n/a
On 19/08/2006 01:32, axlq wrote:

[snip]
Seriously, do you really expect most users who are busy editing a
long CGI form to WANT their work to be wiped away and replaced by a
new window when clicking on a help link in that form? And do you
really expect the average web user to be savvy enough to right-click
on the link to open the help page in a new window?
What makes you think that a new window (or tab) is the only solution to
that sort of problem?

Of course, one would hope that a form would be intuitive enough to
complete without any help at all, but failing that, explanations could
be included as linked endnotes. One could even go further, using a
combination of client-side scripting, CSS, and the DOM to move the nodes
that comprise each note to a point near the relevant form controls and
hide them there. The links are then transformed to acts as toggles,
showing and hiding that text. Through the use of feature detection, all
of this only happens if the user agent supports the necessary
mechanisms, and would otherwise fall back to the simple set of endnotes.

Mike
Aug 19 '06 #24

P: n/a

axlq wrote:
Why? There are situations, such as displaying "Help" information,
when it's clear that the information is required to be displayed at
the same time as the original page content.

I am not a purist, and I agree with you here, although it should be
explicitly stated that you are going to open a new window.

An even better solution is to have the help appear and disappear next
to the relevant item, if possible. There is no reason to shift the
user's attention away from what they are doing. In my mind, help
should be provided in the context that it's needed and not detract from
the actual task.

$.02

Aug 19 '06 #25

P: n/a
In message <11**********************@75g2000cwc.googlegroups. com>, mens
libertina <me************@yahoo.comwrites
>it should be explicitly stated that you are going to open a new window
Even if you aren't?

--
Andy Mabbett
Say "NO!" to compulsory ID Cards: <http://www.no2id.net/>

Free Our Data: <http://www.freeourdata.org.uk>
Aug 19 '06 #26

P: n/a
In article <CI*****************@tornado.tampabay.rr.com>,
"Jim Carlock" <an*******@127.0.0.1wrote:
For Strict DOCTYPEs, what's the recommended way to get
an anchor to open inside a new browser?
This topic was recently beaten to death on the Web Standards Group
mailing list. See here for a recent archive:
http://www.mail-archive.com/listdad%...ardsgroup.org/

--
Philip
http://NikitaTheSpider.com/
Whole-site HTML validation, link checking and more
Aug 20 '06 #27

P: n/a
Jim Carlock schrieb:
For Strict DOCTYPEs, what's the recommended way to get
an anchor to open inside a new browser?
<a href="http://coolpage.com"
onClick="window.open('http://coolpage.com', 'external', 'location=yes,
menubar=yes, resizable=yes, scrollbars=yes, status=yes, toolbar=yes');
return false">Go to this cool page!</a>

To keep you HTML simpler you can keep the script part outside:

<script type="text/javascript">
function external(targetUrl) {
var props =
"location=yes,menubar=yes,resizable=yes,scrollbars =yes,status=yes,toolbar=yes";
window.open(targetUrl, 'external', props);
return false;
}
</script>

Then the link looks like this:
<a href="http://coolpage.com" onClick="return
external('http://coolpage.com')">Go to this cool page!</a>

HTH
Markus
Aug 21 '06 #28

P: n/a

Jack wrote:
"syntactically not the same as the others"
No, whether 4.01 Strict is coded with target or without it is a matter
for validity, but it's not a matter for syntax.

I'd be wary of ever recommending the use of invalid syntax. Validity,
in a context that's known not to be harmful, is much less problematic.
There's a very stable rule (probably one of the most stable rules of
rendering HTML) that invalid tags can sometimes cause problems but
invalid and unknown attributes get quietly and safely ignored. This has
been a trustworthy behaviour to expect from browsers since the earliest
days of HTML rendering.
One bit of invalid syntax I do use is the empty tag closure for XHTML
Appendix C. We're relying on the SHORTTAG bug for this not to get
rendered, but then every (*) browser does exhibit this behaviour
(*) There's only one that doesn't. I'm still waiting for someone to
demo a 2nd.

Aug 21 '06 #29

This discussion thread is closed

Replies have been disabled for this discussion.