/    Sign up×
Community /Pin to ProfileBookmark

Hi guys,

I know that gonna be stupid but i don t know anything about programmation. so sorry

But i try to put on my website the user prompt password

I copy the script inside my page in the beginning in frontpage
but i don t know what s the password, or where i need to put it in the script someboby can help me ?? please

<BODY>

<SCRIPT LANGUAGE=”JavaScript”>

<!– This script and many more are available free online at –>
<!– The JavaScript Source!! [url]http://javascript.internet.com[/url] –>

<!– Begin
var password = ”
password=prompt(‘Please enter your password:’,”);
if (password != null) {
location.href= password + “.html”;
}
// End –>
</SCRIPT>

<p><center>
<font face=”arial, helvetica” size=”-2″>Free JavaScripts provided<br>
by <a href=”http://javascriptsource.com”>The JavaScript Source</a></font>
</center><p>

<!– Script Size: 0.58 KB –>

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@khalidali63May 07.2003 — The above piece of code expects a url as password value and if the password you entered does match a vald html resource in this folder it will open that web page.Its upto you to create webpages with different names and then access them using this logic.

I hope it made any sense..

?
Copy linkTweet thisAlerts:
@colinmaireauthorMay 07.2003 — ok thank but in the script How do i do this
Copy linkTweet thisAlerts:
@khalidali63May 07.2003 — there is nothing you need to do in the script.For e.g

create a simple web page with may be just one line of text and save it as

test.html

Now open the page in which you have th eprompt code.

it should give you a prompt box,input this value in it

test

once you click enter it shoult opoen the test.html page for you.
Copy linkTweet thisAlerts:
@colinmaireauthorMay 07.2003 — Thanks Man
Copy linkTweet thisAlerts:
@khalidali63May 07.2003 — You are welcome "Man"

:p
×

Success!

Help @colinmaire 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 6.17,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...