This all still works in the same way, only the way we ask for the password is different. Below is the HTML for the page that asks for the password.
<html>
<head>
<title>GateKeeper</title>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function doit() {
var password = prompt("Password required:", "")
self.location.href=password + ".htm"
}
// End -->
</SCRIPT>
</head>
<body bgcolor="#FFFFFF">
This link points to a <a href="JavaScript:doit()">secured
page</a>.
</body>
</html>
In red we see the function doit() that makes a pop-up box appear to ask for the password, appends ".htm" to whatever is entered there, and sends the browser to the URL it creates this way.
In blue we see the hyperlink in the text, this time not pointing to another page, but to the JavaScript function doit().
|