Message from discussion
mini-tutorial needed: 'target=""' attribute for 'A'
Received: by 10.66.77.3 with SMTP id o3mr3485531paw.13.1347408342649;
Tue, 11 Sep 2012 17:05:42 -0700 (PDT)
Path: a8ni12948551pbd.1!nntp.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsgate.cuhk.edu.hk!goblin1!goblin.stu.neva.ru!news.albasani.net!.POSTED!dorayme
From: dorayme <dora...@optusnet.com.au>
Newsgroups: comp.infosystems.www.authoring.html
Subject: Re: mini-tutorial needed: 'target=""' attribute for 'A'
Date: Mon, 03 Sep 2012 21:26:33 +1000
Organization: albasani.net
Lines: 49
Message-ID: <dorayme-A40AA8.21263203092012@news.albasani.net>
References: <1gvfvb0tom0wx.w54jj69q61gb.dlg@40tude.net> <dorayme-3294ED.08164302092012@news.albasani.net> <1xlbf6qgba48s.if2ow1vhn2le$.dlg@40tude.net> <dorayme-FB9A2B.13511302092012@news.albasani.net> <zdhdz4fli2lv$.uzgcjxq1ykd9.dlg@40tude.net> <dorayme-AE1FCB.16501203092012@news.albasani.net> <k21lqp$eu0$1@dont-email.me>
Mime-Version: 1.0
X-Trace: news.albasani.net hQ5/lnZ+c/aazXWLMe3N2SqW5lcU97CCQiIEC54gM/D/UwMNdcTZ+bcWt1z3fULMNfDJM21E6Z3lMcAzGwy/gH/Nhh1mu4qUsPq2pEPbtAwEjVgAWRZoYUAKmn3Ki2GJ
NNTP-Posting-Date: Mon, 3 Sep 2012 11:26:36 +0000 (UTC)
Injection-Info: news.albasani.net; logging-data="om1EINkp+z00gSMdoLnOHQ8TNWCrY2DGPxqDBn0QYtubVU4WbRmVpVqQ058Z4FsNsoSACWarNq4Dg7sjuGAAanXP0zfa8PjGnMMdEE6U6U3KBKrjIAc1B4+YakXNA2bj"; mail-complaints-to="ab...@albasani.net"
User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)
X-Face: (?.&^`8=1?'(3k^dMfv/xTtVWYx'Z(SdFf;R;Yy|\!#dB6<sMc)S0W+ob?)z_^+ZL_ZU\q\
C\{wkS[X`(N#W}Y{P/'~"8nP]>vcEp}Kl4>_M3t1.XhbUr7yc|<%G"Uo32|g;ie,WvVmR1NJHtZ~(K
8WVW!gt96nR*N%zi\y$TawMUEKQ2p/(uc`NX)pfO+M!unm^:RD9LgJDwnev*,_;$"Vp0
Cancel-Lock: sha1:FBeVxa9VQj/+7iviIh9hAaWLeJc=
Bytes: 3828
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
In article <k21lqp$eu...@dont-email.me>,
"Jukka K. Korpela" <jkorp...@cs.tut.fi> wrote:
> 2012-09-03 9:50, dorayme wrote:
>
...
> > The way that still gets you into heaven is to use js but not to
> > *require* it and not to make it so your visitors *has* to have it or
> > else.
>
> This used to be a good design principle, and it seems to have become
> more popular, perhaps especially thanks to the kind person(s) who coined
> a cool term for it: Unobtrusive JavaScript.
>
> > In the case of a link that opens a js popup window when js is
> > on, and there are no other blockers, you have to fashion your links or
> > otherwise provide for the link to appear in a normal window or tab
> > when js is off.
>
> That part is simple. You simply set up a normal link, possibly with
> target="_blank", and then you start adding features without breaking
> anything. ...
>
> The tricky part is to check all the features of opening a window in
> JavaScript, paying attention to browser differences in parameters and
> default values. But that's off-topic here. The following illustrates
> just the basic idea (of one possible approach) as fas as HTML is considered:
>
> <a href="http://icant.co.uk/articles/seven-rules-of-unobtrusive-javascript/"
> target="_blank" onclick=
> "if(window.open) { window.open(this.href, '',
> 'width=680,height=700,resizable=1,scrollbars=1'); return false}"
> >The seven rules of Unobtrusive JavaScript</a>
>
> (The statement 'return false' aborts normal link processing, so that the
> external page won't be opened twice.)
Yes, your code is excellent. I now recall having trouble with double
link openings when I first used js windows with suitable graceful
degradation.
After having solved the problem to my satisfaction and providing
pop-up windows, I later decided to make do without them. With php
includes, it was easy to provide the visitor with the regular site
navigational aids (permanent and local menus) with every page,
lessening their chance of getting lost. Life suddenly got a lot easier!
--
dorayme