Click to See Complete Forum and Search --> : HTML Coding to access protected directories


computel
02-04-2010, 09:30 PM
Here is the code i'm using

<html>
<head>
<title>YourWebsiteName Your Source For Business eBooks</title>
<meta http-equiv="Content-Type" content="text/html;">
<meta name="keywords" content="book, ebook, e-book, digital, information, info books, download, information products">
<meta name="description" content="YourWebsiteName sells electronic books, or ebooks targeting small business owners and internet entrepreneurs.">
<meta http-equiv="Content-Type" content="text/html;">
<SCRIPT LANGUAGE="JavaScript">

<!-- 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>
in the body this code

<!-- The hidden form field "server" needs to be the
address of your password protected directory. -->

<form name=login>
<input type="hidden" name="server" value="www.turnkeybusinesplan.com/ebook/">
Username:
<input type=text name=username size=20>
<br><br>
Password:
<input type=password name=password size=20>
<input type=button value="Login!" onClick="Login(this.form)" name="button">
</form>


here is the error I get

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Timestamp: Fri, 5 Feb 2010 03:16:48 UTC


Message: A security problem occurred.
ebook/

Line: 45
Char: 1
Code: 0
URI: http://www.turnkeybusinessplan.com/ebooks/

it seems to have something to do with this line

window.location = htsite;

as that is line 45

I'm stumped. All I want to do is have this site http://www.turnkeybusinessplan.com/ebooks use the logon fields and not load the pop window for the .htaccess files to allow the user to access a directory.

Thanks in advance

Fang
02-05-2010, 12:32 AM
No longer supported: http://support.microsoft.com/kb/834489

computel
02-05-2010, 07:03 AM
Thanks but now how do I do this I'm no programmer at all.

Thanks

Fang
02-05-2010, 09:20 AM
Use IE5, change registry values or use an ftp program. All options are only applicable to your own system. For your users, it's the popup.