• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 187
  • Last Modified:


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
1 Solution
<title>Password Protected Page</title>
<h2>Page where you want to go&nbsp;<a href="http://www.therightpage.com"> IS HERE</a>


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. ")

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

Good luck
cgreshamAuthor Commented:
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!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

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.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now