The Dana's wrote:
[color=blue]
> I need to create a static HTML file that runs only on the local
> client PC.
>
> On the page (say PageA.htm), I would like for a hypelink to another
> page (Page B) to appear ONLY if the target file the hyperlink
> references is present (PageB.htm).
>
> So If I'm viewing page A, and Page B is present, then I want a
> hyperlink to show up on Page A to navigate to Page B.
>
> If Page B is not present, then no hypelink would appear for Page B.[/color]
In browsers that implement XMLHttpRequests (current MSIE and Mozilla),
you can use it to validate links. An example document (here I only change
the background color, you can remove the link from the document instead)
is here:
http://www.innoline-systemtechnik.de...alidlinks.html
Note: In older browsers, that do not implement try..catch, this script
will result in a syntax error. Browsers that do implement try..catch, but
not XMLHttpRequest, will state all links as unconfirmed.
ciao, dhgm