how can i restict access to a web page created in Publisher 2003?

G

gordon

built a website and then realized i needed to have 'members only' page, with
password, but it looks like Publisher doesn't do that. any ideas. i can code
a little, but would rather use an add-in or something if there is one..
 
M

Mike Koewler

First, check with your web host - many of them offer password protection
as part of their package.

Second, do a Google search for htaccess. It makes it easy to password
protect a directory. You would, though, need to put your page(s) in a
particular folder and create a link to it - Pub won't automatically do
absolute links (AFAIK).

Three - check Dynamic Drive dot com for a script.

Mike
 
M

MIchaeldane

Try this script.

Description: A simple login and password script. Login is JavaScript,
password is Kit. To change this information, simply go into the script and
change it. Be sure to also change the target page (Location).



<script language="javascript">
<!--//
/*This Script allows people to enter by using a form that asks for a
UserID and Password*/
function pasuser(form) {
if (form.id.value=="JavaScript") {
if (form.pass.value=="Kit") {
location="page2.html"
} else {
alert("Invalid Password")
}
} else { alert("Invalid UserID")
}
}
//-->
</script>

<center>
<table bgcolor="white" cellpadding="12" border="1">
<tr><td colspan="2"><center><h1><i><b>Login
Area</b></i></h1></center></td></tr>
<tr><td><h1><i><b>UserID:</b></i></h1></td><td><form name="login"><input
name="id" type="text"></td></tr>
<tr><td><h1><i><b>Password:</b></i></h1></td><td><input name="pass"
type="password"></td></tr>
<tr><td><center><input type="button" value="Login"
onClick="pasuser(this.form)"></center></td><td><center><br><input
type="Reset"></form></td></tr></table></center>
 
G

gordon

Wonderful! Thank you!!!

MIchaeldane said:
Try this script.

Description: A simple login and password script. Login is JavaScript,
password is Kit. To change this information, simply go into the script and
change it. Be sure to also change the target page (Location).



<script language="javascript">
<!--//
/*This Script allows people to enter by using a form that asks for a
UserID and Password*/
function pasuser(form) {
if (form.id.value=="JavaScript") {
if (form.pass.value=="Kit") {
location="page2.html"
} else {
alert("Invalid Password")
}
} else { alert("Invalid UserID")
}
}
//-->
</script>

<center>
<table bgcolor="white" cellpadding="12" border="1">
<tr><td colspan="2"><center><h1><i><b>Login
Area</b></i></h1></center></td></tr>
<tr><td><h1><i><b>UserID:</b></i></h1></td><td><form name="login"><input
name="id" type="text"></td></tr>
<tr><td><h1><i><b>Password:</b></i></h1></td><td><input name="pass"
type="password"></td></tr>
<tr><td><center><input type="button" value="Login"
onClick="pasuser(this.form)"></center></td><td><center><br><input
type="Reset"></form></td></tr></table></center>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top