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
SCRIPT HERE:
<SCRIPT LANGUAGE=”JavaScript”>
<!– Based on FTP log in by: Reinout Verkerk –>
<!– Original: Gordon Hudson (
<!– Web Site: [url]http://www.hostroute.com/
<!– This script and many more are available free online at –>
<!– The JavaScript Source!! [url]http://javascript.internet.com
<!– 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>