Target _blank

A

Andy Dingley

target, not href, but I'm sure that's a typo.

Yes, indeed.
The leading
underscores are allowed but not obligatory as the above
examples may suggest.

They're needed if you want to trigger the "new window" behaviour.
They're also forbidden by the standards, unless they're one of a small
named list, such as "_blank"
 
M

Mitja Trampus

Andy said:
[opening new window]
The leading
underscores are allowed but not obligatory as the above
examples may suggest.

They're needed if you want to trigger the "new window" behaviour.
They're also forbidden by the standards, unless they're one of a small
named list, such as "_blank"

Check again with w3c...
"If any target attribute refers to an unknown frame F, the
user agent should create a new window and frame, assign the
name F to the frame, and load the resource designated by the
element in the new frame."
 
A

Alan J. Flavell

Check again with w3c...

We already did, unlike you.
"If any target attribute refers to an unknown frame F, the user agent should
create a new window and frame, assign the name F to the frame, and load the
resource designated by the element in the new frame."

Read http://www.w3.org/TR/html401/types.html#type-frame-target
and weep. Or at least apologise to Andy.

Except for the reserved names listed below, frame target names
(%FrameTarget; in the DTD) must begin with an alphabetic character
^^^^
(a-zA-Z). User agents should ignore all other target names.
^^^^^^^^^^^^^
 
M

Mitja Trampus

Alan said:
We already did, unlike you.




Read http://www.w3.org/TR/html401/types.html#type-frame-target
and weep. Or at least apologise to Andy.

Except for the reserved names listed below, frame target names
(%FrameTarget; in the DTD) must begin with an alphabetic character
^^^^
(a-zA-Z). User agents should ignore all other target names.
^^^^^^^^^^^^^

I don't see a reason for weeping here. True, I made a
mistake by thinking _foo tagets are allowed. But only by
thinking so - the "check again with w3c" was referring to
"they [the _foo targets] are needed if you want to trigger
the new window behavior". The thread was namely about what
to specify as target to open a new window.
Not exactly a case of perfect quoting on my part, I'm afraid.
 
A

Andy Dingley

Check again with w3c...
"If any target attribute refers to an unknown frame F, the
user agent should create a new window and frame, assign the
name F to the frame, and load the resource designated by the
element in the new frame."

Do you have a ref for that ? And does it work ?

I currently use target="_foo" quite a bit. I know it's invalid, but I
also thought I needed the underscore to reliably trigger new-window
behaviour when I needed it. If "foo" will give me the same result, I'd
rather use that.


And if anyone feels like insulting me, just joing the Vito Kuhn thread
over in rec.woodworking. It's getting quite funny now :cool:
"so the swine started ranting in Swinese instead" and great concerns
being expressed over my immortal soul.
 
N

Neredbojias

With neither quill nor qualm, Andy Dingley quothed:
Do you have a ref for that ? And does it work ?

I currently use target="_foo" quite a bit. I know it's invalid, but I
also thought I needed the underscore to reliably trigger new-window
behaviour when I needed it. If "foo" will give me the same result, I'd
rather use that.


And if anyone feels like insulting me, just joing the Vito Kuhn thread
over in rec.woodworking. It's getting quite funny now :cool:
"so the swine started ranting in Swinese instead" and great concerns
being expressed over my immortal soul.

Well, at least it wasn't Pig Latin.
 
A

Alan J. Flavell


Jukka says yes, for example. Of course, the spec also says:

"User agents may provide users with a mechanism to override the
target attribute."

So, suppressing the author's intended action at the user's behest also
counts as "working".
I currently use target="_foo" quite a bit.

If you mean that literally, then if it does what you want, the
specification says it's NOT working; it's supposed to be ignored,
but it seems most browsers ignored that part of the spec, so they do
what misguided authors want (i.e don't work). If they ignored the bad
request, then they *would* be working to specification.
I know it's invalid, but I also thought I needed the underscore to
reliably trigger new-window behaviour when I needed it.

Hang on. If the named target already *does* exist, it's not
*supposed* to "trigger new-window behaviour" - it's supposed to
display in the existing named frame/window.

The documented target to use, if you want to cripple the user's system
by plastering it with ever-increasing numbers of new windows, is the
reserved special target name "_blank".
If "foo" will give me the same result, I'd rather use that.

No, if you use "foo" it will work, doing what you intended. When you
use "_foo", it only does what you intended (on typical browsers)
because it *doesn't* work to specification. One day they might
correct the bug.

have fun
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,201
Latest member
KourtneyBe

Latest Threads

Top