Solved

Passwords

Posted on 1998-09-10
2
173 Views
Last Modified: 2010-04-09
I need a fast quick password java script to use in html. I am a new programmer to java and html, but my boss thinks I know it. Help
0
Comment
Question by:cgresham
2 Comments
 

Accepted Solution

by:
mapper earned 50 total points
ID: 1837540
<html>
<head>
<title>Password Protected Page</title>
<h2>Page where you want to go&nbsp;<a href="http://www.therightpage.com"> IS HERE</a>
</head>

<body>

<script>
funci()
function funci() {
var dToday = new Date()
var nHours = dToday.getHours()
var nogo = ""
var yes = ""
if ((nHours >= 12))
while (yes != "cya") {
yes = prompt("Welcome.  Please Type The Correct Password For This Afternoon: "+Date(),"Type The Password Here .")
}
{alert("Welcome! ")
}

if ((nHours <= 12))
while (nogo != "cya") {
nogo = prompt("Type The Correct Password For This Morning: "+Date(),"Type The Correct Password Here. ")
}
alert("You Have Entered The Correct Password. ")
}
</script>



</body>
</html>
       
NOTE: this can be defeated easily - just disable your JavaScript and you will have access to the password...

Good luck
0
 

Author Comment

by:cgresham
ID: 1837541
This was quite an experience for me.  I need help and mapper answered me in a timely manor within about an hour.  This is a great resource! I hope that you folks continue this service, and when I become an "expert", I hope I can answer questions for you.

Thanks again!
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

806 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question