Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Passwords

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

860 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