- From: David Holstius <holstius@msu.edu>
- Date: Mon, 6 Nov 2000 16:28:05 -0500
- To: "Bailey, Bruce" <Bruce_Bailey@ed.gov>
- Cc: <w3c-wai-ig@w3.org>
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 Monday, 6 November 2000 16:27:47 UTC