Dynamic TOC based on existence of files on disk
by Jennifer Fell <jennifer.fell(at)nativeminds.com>
|
| Date: |
Wed, 16 Aug 2000 11:57:04 -0700 |
| To: |
"'hwg-techniques(at)hwg.org'" <hwg-techniques(at)hwg.org> |
| Cc: |
Jennifer Fell <jennifer.fell(at)nativeminds.com> |
| |
todo: View
Thread,
Original
|
|
Hi. I have an interesting challenge for y'all. I'm trying to write an HTML
page that is "aware" of which other HTML files are on disk locally and which
are not...and a page which will then do something intelligent with that
information.
Setup: I write online help for a software product. We deliver our help in
HTML (not HTMLHelp) and our readers use their default Web browser to read
it. The help files live on the users hard drive. There is a main table of
contents, from which readers can get to whatever page of doc they need.
Twist: The product that I document has evolved into a product suite with 4
main products/components with separate installers. Each product/component
has its own set of help files. Some help files are shared across products
and some aren't.
Goal: I'd like to make the main table of contents "aware" of which
products/components are installed so that it can offer the reader
appropriate links. There's a sea of possible ASP, Java, and JavaScript
features that *might* do what I want. I wonder if someone has already done
this and can help me swim to the right feature??
I can imagine two models:
Option 1: The TOC displays links for all of the manuals for all four
products. The links are defined in a way such that if the desired manual is
installed (file exists), then when the user clicks the link, the manual is
displayed. If the manual is not installed (file does not exist), then a
dialog pops up explaining that the help is not installed for that
product/component. Or a different HTML file is displayed. I looked for a way
to use the onClick event and JavaScript to check for the existence of the
file and then "do the right thing" but it seems that the JavaScript
functions that open a new file don't return a value. The user's browser goes
right ahead and displays the "File Not Found" error. Suggestions? Did I miss
the key JavaScript function?
Option 2: The TOC displays only the links for manuals that are installed.
Other than creating a separate TOC for each permutation of installed
components, is there a way to dynamically change the TOC based on what's
installed. This seems more difficult but more elegant. I am on good terms
with the installer programmers if that helps. Do we keep a text file (or
registry setting) somewhere with a list of installed components so that the
HTML pages can consult that list?
Option 3: If I'm stuck, I might have to insist on 3A: Separate help systems
and separate help contents pages for each product, or 3B: Everyone gets the
help for all products, or 3C: The core docs are listed in the help contents
and add-ons are available from the Windows Start menu (which is easy to
update via the installers and uninstallers).
Any advice? Has anyone done something similar?
Thanks,
Jennifer Fell
Manager of Technical Documentation
NativeMinds, Inc.
jennifer.fell(at)nativeminds.com
415-777-3111 x232
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA
This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.