[thelist] target="_blank"

Shirley Kaiser, SKDesigns skaiser1 at skdesigns.com
Sun Aug 19 20:30:32 CDT 2001


rudy,

At 08:30 PM 08/18/2001, you wrote:
> >... I wonder about just using another term that isn't one of the
> >  "reserved" terms, such as target="new_window"
>
>hi shirley
>
>i think it's the target attribute itself that's invalid in xhtml strict

Oh!

> > Have you hopped over to the W3 specifications about this?
>
>yeah, but i get lost easy

I have the same problem there. It needs someone to design a far more user 
friendly approach to the site, that's for sure! (I think Microsoft's site 
is a million times worse - I actually use search engines such as dogpile or 
google to find something at their site rather than trying to find it 
directly via microsoft.)

>here's how i solved the problem
>
>    <a href="foo.htm"
>       onclick="window.open(foo.htm); return false;">foo</a>
>
>neat, eh?  if javascript is enabled, the page opens in a second window, but
>if it isn't, the page just opens in the same window

Yes, good approach.

rudy, FWIW I also found this idea at w3's discussion list suggested by Jim 
Correia of Barebones.com
http://lists.w3.org/Archives/Public/www-html/2000Sep/0004.html

So it seems to be something that's being used as one possible approach to 
this. There's an interesting debate back and forth within the 
correspondence about the target attribute, frames, etc. So it does seem 
that the target attribute won't allow the "strict" to validate because it's 
really supposed to be for frames. I'm also laughing at myself because I 
didn't even think about this being yet another hack.... it's so commonly 
done (and see below, too!).

>but  <sigh />  there was an added complication
>
>the page i was opening up in the second window was actually just one of a
>set of pages, all linked together, with no way to get back to the page that
>originally launched the second window
>
>well hey, that's not a problem if it really *is* a second window -- just
>close the second window, and the page that launched it is still sitting
>there
>
>which is why i started out wanting to use target="_blank"
>
>but the more i thought about it, the less i liked it -- the target
>attribute seems to be intended for targetting a frame, and what if the
>browser doesn't support frames?  it's the same headache for me as when
>javascript is disabled, but at least i gots <noscript> to help out!
>
>if javascript is not enabled, the onclick won't work, but the link itself
>will, and you find yourself "going" to the first of the set of linked
>pages, and after clicking around in them for a while, getting back to the
>page that launched them is hopeless -- the history stack is filled up
>
>so what i did, i snuck a link into each of the linked pages that works like
>this --
>
>    <a href="/index.cfm"
>       onclick="self.close(); return false;">back</a>
>
>that isn't *exactly* the same, because with javascript disabled, you will
>end up going back to whatever page you hardcode in there
>
>and of course if javascript is enabled, it just closes the second window

yes, so that's good thinking, too.

Now that I think about it, I've done this for a client's site that has a 
slide show  but I just did it with a simple JavaScript pop-up window, but 
each page within the window can close like you mention, or go forward and 
backward. My thought, though, wasn't at all related to XHTML at the time, 
just providing a way to show a Before and After tour of teeth work done by 
a cosmetic dentist (and it will also work with JavaScript turned off, as 
you mention).

>and now i can make use of  document.write  and a <noscript> block
>to give tailored instructions to the page visitor depending on whether
>javascript is enabled or not
>
>pretty neat, eh?

I also didn't take the additional step of writing the <noscript> block that 
you did -- great idea.

Interesting thinking about all this, rudy.... thanks for sharing your 
brainstorms. This seems like a great idea to cover the bases with XHTML strict.

I'll be converting WebsiteTips.com to XHTML soon, and I was thinking of 
adding a script to allow visitors to click on to open external windows in a 
new window or not - I've seen them around at various blog sites, for example.

I mention that because currently WebsiteTips.com EXTENSIVELY uses the 
target attribute for its external links resources (and there are at least 
2,000+). For several years now for that site I've been using the same 
target="new_window" for each one so that the external links open in the 
same second window so visitors don't have a new window for every single 
link while keeping the WebsiteTips.com open  -- my idea is that they can 
click on something to see if that's what they're looking for, and if not, 
click on another link at Websitetips.com and try that one.

However, it's way past due to make changes like this one above, among other 
things. So you've really gotten my wheels turning about my own site, too. 
<grin>

>and ya know what?  my page validates xhtml strict again   ;o)
>
>feel free to check it out, it's aunt netty on my home page at rudy.ca

What fun, rudy. I like what you've done. Wow, the Web has certainly come a 
long way in a very short amount of time, now that I look at this. Geez. 
Great name - Aunt Netty.

Warmly,
Shirley
--
Shirley E. Kaiser, M.A.
SKDesigns  mailto:skaiser1 at skdesigns.com
Website Development  http://www.skdesigns.com/
Pianist, Composer  http://www.shirleykaiser.com/
Moderator, I-Design http://www.adventive.com/lists/idesign/summary.html





More information about the thelist mailing list