Thanks for all the help !
This worked:
---------------
Parent.htm
---------------
<html>
<head>
<title id="ParentChild">ParentChild</title>
</head>
<body><font face='Arial'>
<h1>This is the Parent</h1>
<ul>
<li><a href="child.htm">Go to Child</a></li>
</ul>
</html>
---------------
Child.htm
---------------
<html>
<head>
<title >Child</title>
</head>
<body><font face='Arial'>
<br><br><p><center>
<script language="javascript">
function masterWindow()
{
window.open("parent.htm", "_top");
}
var oDummy = new Image();
oDummy.src = "parent.htm";
var sURI = oDummy.src.replace(/[#?].*$/, "");
try {
var oHttpReq = window.ActiveXObject
? new ActiveXObject('Microsoft.XMLHTTP')
: window.XMLHttpRequest
? new XMLHttpRequest()
: null;
if (oHttpReq) {
oHttpReq.open('HEAD', sURI, false);
oHttpReq.send(null);
var iStat = oHttpReq.status;
if (iStat >= 400) {
var bShow = false;
} else {
var bShow = true;
}
}
}
catch(e) {
var bShow = false;
}
if (bShow) {
document.write("<form>");
document.write(" <input type='button' value='Go to Parent'
onClick='masterWindow()' />");
document.write("</form>");
}
</script>
</html>
"The Dana's" <b6*****@hotmail.com> wrote in message
news:mr********************@comcast.com...
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.
Can someone post some code that does this?