View Single Post
Old 12-08-2012, 11:19 PM   PM User | #6
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
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.
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
AndrewGSW is offline   Reply With Quote