Yes I was reading a little further. If you provide your own 404 page then there will be something on the page that you can refer to that identifies it. Or, of course, this 404 page could offer to redirect the user.
I had what I thought was a clever idea, which was to wait for onload to complete and just read the
location (the address); if it's different then the page they were seeking doesn't exist. But I don't know if this would work. Something like:
Code:
var oIframe = document.getElementById("secretIframe");
oIframe.onload = function () {
// for compatibility
var oDoc = oIframe.contentWindow || oIframe.contentDocument;
if (oDoc.document) {
oDoc = oDoc.document;
}
alert(oDoc.location.href);
if (oDoc.location.href != thePasswordAddress) {
// that is, having stripped out 'http://'
// 404 - out of luck!
}
};
Anyway, good luck. Andy.