|
Posted by Alan J. Flavell on 11/18/05 01:20
On Thu, 17 Nov 2005, Andy Dingley wrote:
> On Wed, 16 Nov 2005 11:08:59 +0100, Mitja Trampus <nun@example.com>
> wrote:
>
> >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 ?
http://www.w3.org/TR/html401/present/frames.html#h-16.3.2
http://www.google.co.uk/search?q=%22If+any+target+attribute+refers+to+an+unknown+frame%22
> And does it work ?
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
Navigation:
[Reply to this message]
|