Password Protect One Page

J

JCO

I need to password protect one page and I will have to use JavaScripts. I
cannot go under Tools | Server to set permissions.

I grabbed some scripts from the Internet but I'm getting an Script error
that says opener.closed is null. Any idea what this means.
 
S

Steve Easton

What kind of Server and server OS is
your site hosted on??

Example: Apache/UNIX??

--
Steve Easton
MS MVP FrontPage
95isalive
This site is best viewed..................
...............................with a computer
 
B

Brett...

JCO said:
I need to password protect one page and I will have to use
JavaScripts. I cannot go under Tools | Server to set permissions.

I grabbed some scripts from the Internet but I'm getting an Script
error that says opener.closed is null. Any idea what this means.

Try:

http://javascript.internet.com/passwords/gatekeeper.html


--
Brett

A friend of mine is into Voodoo Acupuncture. You don't have to go.
You'll just be walking down the street, and...ooooohhhhhh, that's much
better...
 
J

JCO

http://www.angelfire.com is hosting it.

They do not support passwords on the server side. Also, I'm using Windows
2000, but not ntfs file system. I'm using FAT 32. My only option is with
JavaScript's... I think.

I don't need any type of secure stuff. It does not have to be bullet proof.
Just something that ask for a password. The same password for every user is
okay.
 
J

JCO

This is what I'm using already.
This is what I'm having problems with, however, I'm very green in this area.
I may of done something wrong. The instructions are not straight
forward.... for me to understand.
 
J

JCO

Why doesn't this simple script work, when the page is published. It works
in preview mode.

<!-- jco; Invoke Password Prompt -->
<SCRIPT LANGUAGE="JavaScript" type="text/javascript">
<!-- Begin
var password = ''
password = prompt('Please enter password:','');
if (password == "password")
{
location.href= "Private.htm";
} else {
location.href= "_Blank.htm";
}
//end...........
</SCRIPT>

I understand that this is a hard coded password and not desirable.
Thanks.
 
R

Ronx

You have not closed the HTML comment started at
<!--Begin

Change //end......... to //end -->
 
B

Brett...

JCO said:
Why doesn't this simple script work, when the page is published. It
works in preview mode.

<!-- jco; Invoke Password Prompt -->
<SCRIPT LANGUAGE="JavaScript" type="text/javascript">
<!-- Begin
var password = ''
password = prompt('Please enter password:','');
if (password == "password")
{
location.href= "Private.htm";
} else {
location.href= "_Blank.htm";
}
//end...........
</SCRIPT>

I understand that this is a hard coded password and not desirable.
Thanks.

An understatement!
Gatekeeper works really well and doesn't do anything as useless as storing
the password in the HTML!
I am surprised that you haven't been able to get it up and running as it is
very straightforward to install.

--
Brett

He was a multi-millionaire. Wanna know how he made all of his money?
He designed the little diagrams that tell which way to put batteries
in.
 
Top