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
<!-- Based on FTP log in by: Reinout Verkerk -->
<!-- Original: Gordon Hudson (sales@hostroute.com) -->
<!-- Web Site: http://www.hostroute.com/ -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! 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. -->
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.
Bookmarks