You could play with the following. But, erm...., it's
not quite working?!
Added: actually, I think it is working, if uploaded to a server.
Code:
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<script>
var thePasswordAddress = "not_carousel.html";
window.onload = function () {
var oIframe = document.getElementById("secretIframe");
oIframe.onload = function () {
// for compatibility
var oDoc = oIframe.contentWindow || oIframe.contentDocument;
if (oDoc.document) {
oDoc = oDoc.document;
}
var newLoc = oDoc.location.href;
//console.log(oDoc);
alert(newLoc);
if (newLoc.indexOf(thePasswordAddress) + 1) {
alert('Yes, it is the correct page!');
} else {
// 404 - out of luck!
alert('Doh! Not found!');
window.location = "dragto.html";
}
};
oIframe.src = "carousel.html";
};
</script>
</head>
<body>
<h1>Just a Heading</h1>
<iframe id="secretIframe">Hello</iframe>
</body>
</html>