/    Sign up×
Community /Pin to ProfileBookmark

Script Prompt Noobie

hi im a noobie and i want to know how to encode java script prompt. Here is a script and can anyont tell me what to do step by step.

<SCRIPT LANGUAGE=”JavaScript”>
<!–
function makeArray(){
this.length = makeArray.arguments.length
for (var i = 0; i < this.length; i++)
this[i + 1] = makeArray.arguments[i]
}
var Array = new makeArray(‘B’,’R’,’E’,’L’,’E’,’F’,’O’,’A’,’T’);

function password() {
var pass =
(numArray[2])+(numArray[3])+(numArray[4])-(numArray[1])+(numArray[4])+(numArray[6])+(numArray[8])+(numArray[5])+(numArray[7]);
var num = 1;
var pass1 = prompt(‘Please Enter Your Password’,”);

while (num < 3) {
if (pass1 == pass) {
alert(‘Good Job !’);
window.location=’http://www.blind-dice.com/challenges/javascript/js2.cgi’;

break;
}

num+=1;
var pass1 =prompt(‘Wrong, wrong, all wrong!.’,”);
}

}
// –>
</SCRIPT>

to post a comment
JavaScript

14 Comments(s)

Copy linkTweet thisAlerts:
@96turnerriSep 12.2003 — hmm yes it doesnt do alot does it ill have a look for you see what i can do
Copy linkTweet thisAlerts:
@JupacSep 12.2003 — umm it not good to do logins with javascript anyways here is a simpler script

<script type=text/javascript>

function login(){

pass = prompt('Password',"password");

if (pass=="passwordhere"){alert("ok")}

else{

alert("Wrong haha");

window.close();

}

}

</script>

<body onload="login();">
Copy linkTweet thisAlerts:
@96turnerriSep 12.2003 — love the little animated gif [B]lakers01[/B] now that script is alot easier
Copy linkTweet thisAlerts:
@JupacSep 13.2003 — thx? im happi to help?
Copy linkTweet thisAlerts:
@96turnerriSep 13.2003 — just about you signature [B]lakers01[/B] if that was in a script on some pages, and you had a doc say info.txt would that load at the bottom of the pages it was on (or where it was put in the main page?) i am very new to php lol?
Copy linkTweet thisAlerts:
@NoObIeauthorSep 13.2003 — so do u know the anwaser?
Copy linkTweet thisAlerts:
@96turnerriSep 13.2003 — i dont know the answer to my question, but lakers01 give u an answer for your q :p
Copy linkTweet thisAlerts:
@JupacSep 13.2003 — You can emble PHP with html so just put in the body and name it like index.php
Copy linkTweet thisAlerts:
@pyroSep 13.2003 — An include script in PHP will include the content of the included file wherever it appears on the page. It works much like a SSI include. I use PHP includes on my site to include a header and a footer. The header contains all the code up to the content (navigation, etc) and the footer contains all the code after the content. By using these, when I update my site, I just have to make the changes to one file, and my entire site is updated.
Copy linkTweet thisAlerts:
@JupacSep 13.2003 — same post time again?
Copy linkTweet thisAlerts:
@96turnerriSep 13.2003 — nice one ill try that when i get home from work tonight thank you again lol
Copy linkTweet thisAlerts:
@NoObIeauthorSep 13.2003 — where does the content start and stop?
Copy linkTweet thisAlerts:
@JupacSep 13.2003 — HUh wat do u mean when u use a inlude the html output would be wats in the file
Copy linkTweet thisAlerts:
@pyroSep 13.2003 — Let's do a quick example...

test.txt file:
&lt;p&gt;&lt;b&gt;this is some text&lt;/b&gt;&lt;/p&gt;

page.php
[code=php]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>PHP include demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?PHP
include "test.txt";
?>
</body>
</html>[/code]


Will result in this code, when you view the source of page.php

&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;PHP include demo&lt;/title&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;p&gt;&lt;b&gt;this is some text&lt;/b&gt;&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
×

Success!

Help @NoObIe 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.18,
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,
)...