- From: yuu morita <yuu@os.rim.or.jp>
- Date: Wed, 8 Nov 2000 00:34:24 +0900
- To: <w3c-wai-ig@w3.org>
The following writing works well in JS enable/disable:
<a href="foobar.html" target="_blank" onclick="Help('foobar.html');return false;">Definition of foobar</a>
I think this is easy to read when view source.
----- Original Message -----
From: "David Holstius" <holstius@msu.edu>
Sent: Tuesday, November 07, 2000 6:28 AM
Subject: Re: How do I make JavaScript "pop-up help" accessible?
> Something that I've done in the past is to make a Javascript function that
> writes Javascript code into the document. I don't know how "official" this
> is, but it seems to work. Something like:
>
> function WritePopupHelp( helpFile, linkText ) {
> var s = '<a href="javascript:Help(\'' + helpFile + '\')">' + linkText +
> '</a>';
> document.write(s);
> }
>
> Combine it with a Help() function that you define, and then code your actual
> HTML like:
>
> <script type="text/javascript">WritePopupHelp('foobar.htm', 'Definition of
> foobar')</script>
> <noscript><a href="foobar.htm">Definition of foobar</a></noscript>
>
> That way, only users with JS enabled will get source that invokes JS.
>
> It becomes a little redundant to hand-code all those script/noscript pairs,
> so if you have the luxury of server-side processing you can wrap the
> generation of each script/noscript pair in a server-side function. (You
> wouldn't want to put it in another Javascript because then folks w/out JS
> wouldn't get *anything*.)
>
> I'd like to know what WAI-IG members think of this workaround.
>
> David Holstius
> holstius@msu.edu
>
> > On Monday, November 06, 2000 2:19 PM, Bruce Bailey wrote:
> >
> > I site I am reviewing generates context-sensitive "pop-up" help using
> > JavaScript. I imagine they are doing this for the effect that:
> > (1) The main window stays open;
> > (2) The new pop-up window is smaller than full-screen and has none of the
> > normal browsing controls -- so it doesn't really look so much a web page.
> >
> > The pop-up is invoked by code like:
> > <A href="JavaScript:Help('foobar.htm')">definition of FooBar</A>
> >
> > Obviously, the HTML file is available if one can figure out how to hunt it
> > down (it's fairly well hidden). Lynx just generates a message: "Alert!:
> > Unsupported URL scheme!" and nothing happens.
> >
> > Is there an alternative way to code this so that 4x browsers still get the
> > no-frills pop-up version, but Lynx (and other JavaScript-free) users get
> the
> > regular URL for the help text?
>
>
Received on Tuesday, 7 November 2000 10:34:35 UTC