/    Sign up×
Community /Pin to ProfileBookmark

all about password.

i just want to create a password in my javascript webpage, and after the user inputted the right password he will be directed to other wegpage that i created.

heres my code

<html>
<head>
<title>”level 1″</title>
</head>
<body>
<script type=”text/javascript”>

alert (“hi challenger! please press ok and tell me youre name”);
var a = prompt(“so your name is? “, ” to be honest! I FORGOT!”)
alert (“ahh, ok! so youre name is ” + a);

document.write(“if you want to challenge yourself then you’ve come to the right place!<br>first! i would like you to find the password to gain access to level 2”);
</script>

<script language=”text/JavaScript”>
{
var a=”null”;
function check()
{
if (document.a.c.value == a)
{
document.location.href=”cary1.html/”+document.a.c.value+”.htm”;
}
else
{
alert (“Try again”);
}
}
}
</script>

<tr>
<td width=”100%” height=”267″ valign=”top”><b><font size=”7″ face=”Arial”>Level 1</font></b><p>&nbsp;</p>
<div align=”center”>
<center>
<table border=”1″ cellspacing=”1″ style=”border-collapse: collapse” bordercolor=”#111111″ width=”15%” id=”AutoNumber4″>
<tr>
<td width=”100%”>
<p align=”center”><font size=”1″ face=”Tahoma”><br>
</font><font size=”2″ face=”Tahoma”>Password/font><form name=”a” action=”javascript:check()”>

<p align=”center”>
<input type=”login” name=”c” maxlength=”25″ size=”16″><br>
<br>
<input type=”submit” value=” Log In “></p>
</form></p>
</td>
</tr>
</table>
</center>
</div>
</font></b></p>
</td>
</tr>

</body>
</html>

oops! i forgot to say, i want to write the password in the page source so that it can be view by the users, what i want to create are a maze-like webpage where you will need to find the password.

thanks!

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@KorDec 04.2009 — what i want to create are a maze-like webpage where you will need to find the password.[/QUOTE]
No way. At least not 100&#37; in a secure way. Javascript is a [I]client-sid[/I]e language, thus the code is to be seen by the user, a way or another. Easily enough for an average coder to decipher whichever you might have ciphered.

JavaScript was not invented for this kind of job. Use a [I]server-side[/I] solution for that.
Copy linkTweet thisAlerts:
@Jeff_MottDec 04.2009 — Actually this can and has been done. See http://www.webdeveloper.com/forum/showpost.php?p=925641&postcount=1

It works by encrypting your protected content with a thoroughly tested and secure algorithm, which even the world's best cryptographers can't break.

Enjoy!
Copy linkTweet thisAlerts:
@cary1234authorDec 05.2009 — thank you very much.
Copy linkTweet thisAlerts:
@KorDec 05.2009 — 
It works by encrypting your protected content with a thoroughly tested and secure algorithm, which even the world's best cryptographers can't break.
[/QUOTE]

:rolleyes: If so, CIA must have been already very interested in that algorithm.
Copy linkTweet thisAlerts:
@Jeff_MottDec 05.2009 — :rolleyes: If so, CIA must have been already very interested in that algorithm.[/QUOTE]

In fact, the NSA has approved use of the AES algorithm for top secret material.
×

Success!

Help @cary1234 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.8,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...