Solved

Passwords

Posted on 1998-09-10
2
171 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Introduction The Google Maps API offers various ways to draw dynamic and static maps.  Using a combination of PHP and JavaScript, you can draw active JavaScript maps that allow pan-and-zoom in the client browser window.  You can also draw "static" …
Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

706 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now