<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Secure Area</title>
<link rel="stylesheet" href="Styling.css">
<script src="script.js"></script>
</head>
<body>
<!--For the screen's top line. Create a 3-cell container. In cell 1, put a link to my home page. In cell 2, put the page's title. Leave cell 3 empty. -->
<div id="textbox">
<div class="left-cell"><a href style="color:red"="index.html">Home</a></div>
<div class="middle-cell">Secure Area</div>
<div class="right-cell"> </div>
</div>
<br /><br /><br />
<script>
let i=0, PC='' // Initialize variable i (the counter) and PC.
// Begin a Do ... While i<3 loop.
do { PC=prompt("Please enter your passcode exactly as I gave it to you.","");
// Test PC to see what the LA did.
if (PC == null) (window.location = 'index.html') // He hit "Cancel"; so return to home page.
// He hit the OK button. Did he enter the correct passcode?
if (PC == "XYZ") (i = 5) // Correct passcode entered; so set i = 5.
else (++i) // Incorrect passcode entered; so increment i
}
while i<3
</script>
<!-- We're again in HTML land. Control arrives here only if i==5 (a good passcode was entered) or i==3 (bad passcode entered 3 times). -->
if (i == 5) { <p>Please select the manuscript in which you're interested:</p>
<ol>
<li><a href="EinsteinBook.html">Einstein--The Man and His Thoughts</a></li>
<li><a href="EduAndItsMgtBook.html">Education and Its Management</a></li>
<li><a href="SuccessAndFormalSchoolingBook.html">Success and Formal Schooling</a></li>
</ol>
}
<!-- Control arrives here only if i == 3. Bad passcode entered 3 times.-->
alert("After 3 tries, you have not entered the correct passcode. Hit the OK button, and you will be returned to this site's home page.")
(window.location = 'index.html') <!-- Return him to the home page. -->
</body>
</html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Secure Area</title>
<link rel="stylesheet" href="Styling.css">
<script src="script.js"></script>
</head>
<body>
<!--For the screen's top line. Create a 3-cell container. In cell 1, put a link to my home page. In cell 2, put the page's title. Leave cell 3 empty. -->
<div id="textbox">
<div class="left-cell"><a href style="color:red"="index.html">Home</a></div>
<div class="middle-cell">Secure Area</div>
<div class="right-cell"> </div>
</div>
<br /><br /><br />
<script>
let i=0, PC='' // Initialize variable i (the counter) and PC.
// Begin a Do ... While i<3 loop.
do { PC=prompt("Please enter your passcode exactly as I gave it to you.","");
// Test PC to see what the LA did.
if (PC == null) (window.location = 'index.html') // He hit "Cancel"; so return to home page.
// He hit the OK button. Did he enter the correct passcode?
if (PC == "XYZ") (i = 5) // Correct passcode entered; so set i = 5.
else (++i) // Incorrect passcode entered; so increment i
}
while i<3
</script>
<!-- We're again in HTML land. Control arrives here only if i==5 (a good passcode was entered) or i==3 (bad passcode entered 3 times). -->
if (i == 5) { <p>Please select the manuscript in which you're interested:</p>
<ol>
<li><a href="EinsteinBook.html">Einstein--The Man and His Thoughts</a></li>
<li><a href="EduAndItsMgtBook.html">Education and Its Management</a></li>
<li><a href="SuccessAndFormalSchoolingBook.html">Success and Formal Schooling</a></li>
</ol>
}
<!-- Control arrives here only if i == 3. Bad passcode entered 3 times.-->
alert("After 3 tries, you have not entered the correct passcode. Hit the OK button, and you will be returned to this site's home page.")
(window.location = 'index.html') <!-- Return him to the home page. -->
</body>
</html>