/    Sign up×
Community /Pin to ProfileBookmark

question about login form script‏

Hi,
I downloaded a script and installed this script on my webiste to work as a login form. The idea is enable to make it work as a login form an eliminate the popup form that appears when login into httaccess.
I created my password protected directory with cpanel.

I cannot make it work.
I would apprecieate some ideas please.
Thank you very much!
Dan

Link to the login form: [url]http://www.percussionmagazine.com/login.htm[/url]

SCRIPT HERE:

<SCRIPT LANGUAGE=”JavaScript”>

<!– Based on FTP log in by: Reinout Verkerk –>
<!– Original: Gordon Hudson ([email protected]) –>
<!– Web Site: [url]http://www.hostroute.com/[/url] –>
<!– This script and many more are available free online at –>
<!– The JavaScript Source!! [url]http://javascript.internet.com[/url] –>

<!– Begin
function Login(form) {
var username = form.username.value;
var password = form.password.value;
var server = form.server.value;
if (username && password && server) {
var htsite = “http://” + username + “:” + password + “@” + server;
window.location = htsite;
}
else {
alert(“Please enter your username and password.”);
}
}
// End –>
</script>

</HEAD>
</head>

<body><br>
<BODY>

<!– The hidden form field “server” needs to be the
address of your password protected directory. –>

<form action=”” name=login>
<input type=”hidden” name=”www.percussionmagazine.com/download/download.htm” value=”www.percussionmagazine.com/secure/”>
Username:
<input type=text name=username size=20>
<br><br>
Password:
<input type=password name=password size=20>
<input type=submit value=”Login!” onClick=”Login(this.form)” name=”button”>
</form>

<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: 1.58 KB –>
</body>
</html>

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@twseitexAug 14.2011 — Hi,

standard javascript have no security properties.

javascript works only on client. html too.

during execute of javascript browser need code without encryption (clear code).

At this moment you can see code and scripts with devoloper tool of browser f.e. debugger.

compare password only with php etc. on server.

to get password string use f.e. javascript.

to get password with serurity use f.e. https protocoll.

httpRequest maybe useable for data transfer.
Copy linkTweet thisAlerts:
@percussionmagauthorAug 15.2011 — Hi, I apreiate your help.

But dont understand what to do.

Any other help please.

I adjusted the code:

<SCRIPT LANGUAGE="JavaScript">

function Login(form) {

var username = form.username.value;

var password = form.password.value;

var server = form.server.value;

if (username && password && server) {

var htsite = "http://" + username + ":" + password + "@" + server;

window.location = htsite;

}

else {

alert("Please enter your username and password.");

}

}

</script>

</HEAD>

</head>

<body><br>

<BODY>

<form action="" name=login>

<input type="hidden" name="www.percussionmagazine.com/download/download.htm" value="www.percussionmagazine.com/secure/">

Username:

<input type=text name=username size=20>

<br><br>

Password:

<input type=password name=password size=20>

<input type=submit value="Login!" onClick="Login(this.form)" name="button">

</form>

<p><center>

</center><p>

</body>

</html>
Copy linkTweet thisAlerts:
@jkbigjakeAug 16.2011 — i want to activate java script
Copy linkTweet thisAlerts:
@jkbigjakeAug 16.2011 — i want to activate javascript please help me i cant get on my verizonwebmail,until i get java script.
×

Success!

Help @percussionmag 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.28,
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,
)...