HighDots Forums  

can i password protect a page?

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss can i password protect a page? in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Tina Guthrow
 
Posts: n/a

Default can i password protect a page? - 11-18-2003 , 09:57 AM






Greetings -
setting up a page for field reps to download sheets from, and need some
security. Is there a way to password protect a page?
Thanks


Reply With Quote
  #2  
Old   
August Malson
 
Posts: n/a

Default Re: can i password protect a page? - 11-18-2003 , 10:13 AM






Several ways to do this. Are you using a Server Side Language PHP, JSP, CF?
Do you know what type of Web Server you're using? I know if you're using
Apache, there is the .htaccess file that you place in the directory that you
want to secure, and for IIS you have a GUI control for password protecting
directories.

--
Augie Malson
Certified Macromedia Developer
ICQ: 5619136
-------
Find the Wealth in your Debt:
http://www.thearchgu.com/wealth/
--------


"Tina Guthrow" <tinag (AT) cobbtechnologies (DOT) com> wrote

Quote:
Greetings -
setting up a page for field reps to download sheets from, and need some
security. Is there a way to password protect a page?
Thanks




Reply With Quote
  #3  
Old   
Tina Guthrow
 
Posts: n/a

Default Re: can i password protect a page? - 11-18-2003 , 10:53 AM



My site is being hosted, so it sounds like I'll have to get my host to
help set this up... correct? I thought it might be something I did in
Dreamweaver itself.
Thanks

August Malson wrote:

Quote:
Several ways to do this. Are you using a Server Side Language PHP, JSP, CF?
Do you know what type of Web Server you're using? I know if you're using
Apache, there is the .htaccess file that you place in the directory that you
want to secure, and for IIS you have a GUI control for password protecting
directories.



Reply With Quote
  #4  
Old   
Joe Makowiec
 
Posts: n/a

Default Re: can i password protect a page? - 11-18-2003 , 11:15 AM



On 18 Nov 2003 in macromedia.dreamweaver, Tina Guthrow wrote:

Quote:
My site is being hosted, so it sounds like I'll have to get my host to
help set this up... correct?
Not necessarily, but you will have to know what kind of hosting.

--
Joe Makowiec can be reached at:
http://makowiec.org/contact/?Joe


Reply With Quote
  #5  
Old   
Mad Dog
 
Posts: n/a

Default Re: can i password protect a page? - 11-18-2003 , 12:51 PM



If you want it secure, you may need to see if your web site host has a way
for you to password protect a directory. Many time you can do it yourself
from your Control Panel. If you don't need it to be really secure, and only
want one password, there are a bunch of javascript scripts out there that
will do it. Try Googling "password protect javascript" or try working with
this:

<form>
<p><font face="Arial" size="2"><b>Life Puzzle Facilitator's Area</b><br>
User Name: </font>
<input type="text" name="text2" size="12"><br>
<font size="2"><font face="Arial">Password&nbsp; :</font> </font>
<input type="text" name="text1" size="12"><br>
<input type="button" value="Submit" name="Submit"
onclick=javascript:validate(text2.value,"lifepuzzl e",text1.value,"facilitato
r") >
</p>

</form>

<script language = "javascript">

function validate(text1,text2,text3,text4)
{
if (text1==text2 && text3==text4)
load('facilitator_faq.htm');
else
{
load('password_fail.htm');
}
}
function load(url)
{
location.href=url;
}
</script>


"Tina Guthrow" <tinag (AT) cobbtechnologies (DOT) com> wrote

Quote:
Greetings -
setting up a page for field reps to download sheets from, and need some
security. Is there a way to password protect a page?
Thanks




Reply With Quote
  #6  
Old   
Michael Fesser
 
Posts: n/a

Default Re: can i password protect a page? - 11-18-2003 , 09:11 PM



Mad Dog wrote:

Quote:
If you don't need it to be really secure, and only
want one password, there are a bunch of javascript scripts out there that
will do it.
Forget it.

Trying to build a "protection" with Javascript is waste of time.
It's not possible.

Micha


Reply With Quote
  #7  
Old   
Mad Dog
 
Posts: n/a

Default Re: can i password protect a page? - 11-19-2003 , 02:19 AM



I guess you missed the part where I said "If you don't need it to be really
secure." I've used this in cases where security isn't the issue, there's
nothing top secret, the client only wants to keep out the casual user. This
will do that just fine. If you need security, of course you need
server-level password protection. Different solutions for different needs!


"Michael Fesser" <netizen (AT) gmx (DOT) net> wrote

Quote:
Mad Dog wrote:

If you don't need it to be really secure, and only
want one password, there are a bunch of javascript scripts out there that
will do it.

Forget it.

Trying to build a "protection" with Javascript is waste of time.
It's not possible.

Micha



Reply With Quote
  #8  
Old   
DannyMiller
 
Posts: n/a

Default Re: can i password protect a page? - 05-20-2004 , 11:50 PM



Hey, at least Mad Dog is offering tangible help.

My question is this: with a basic javascript function like you mentioned, when
the user presses "return" (as many people including myself do) rather than
clicking the submit button, it doesn't work.

Is there a way to tweak this particular one to do that? Thanks.


Reply With Quote
  #9  
Old   
Mad Dog
 
Posts: n/a

Default Re: can i password protect a page? - 05-20-2004 , 11:51 PM



To be honest, I have no idea. Someone else here who knows javascript better
might have an answer. I'm a javascript user, not a programmer.

MD


DannyMiller wrote:
Quote:
Hey, at least Mad Dog is offering tangible help.

My question is this: with a basic javascript function like you
mentioned, when the user presses "return" (as many people including
myself do) rather than clicking the submit button, it doesn't work.

Is there a way to tweak this particular one to do that? Thanks.



Reply With Quote
  #10  
Old   
jenij
 
Posts: n/a

Default Re: can i password protect a page? - 05-21-2004 , 01:33 AM



using the enter key, this works for me (on a pc anyway) - it was courtesy of
some helpful soul here last year. you can have multiple passwords providing the
file is .html

eg. password = jeni
page = jeni.html


sits in head area

<script language="JavaScript">
<!--
function password(field)
{
var thepassword=field.toLowerCase();
window.location.href= thepassword+'.html';
}
//-->
</script>


this bit sits in body tag

<form onSubmit="password(this.textfield.value); return false">
<input type="password" name="textfield" maxlength="10">
Your password please, then click
<input type="button" name="Button" value=" GO"
onClick="password(textfield.value)">
</form>



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.