Password Prompt Script??

Discuss about computers & Internet. Including mobile phones, home appliances & other gadgets. Read about Windows security risks or virus updates.
Post Reply
User avatar
emiko08
Chatter
Chatter
Posts: 340
Joined: Sun, 29 May 2005 8:53 pm
Location: Japan

Password Prompt Script??

Post by emiko08 » Fri, 19 May 2006 7:23 pm

Oh! It's me again! :P

Hello.
This time I need a help about Password Prompt Script.


<SCRIPT>

var getin = prompt("password?","")
if (getin=="peppermint")
{
alert('You got it! In you go...')
location.href='http://www.yaplog.com/xxxxxx'
}
else
{
if (getin=="null")
{location.href='nope2.,html'}
else
if (getin!="peppermint")
{location.href='nope.html'}
}
</SCRIPT>


above is the script. of course, my password isn't peppermint. thats beside the point :P

when i type the correct password, it directs me to my page 'http://www.yaplog.com/xxxxxx' but when the page reloads, it asks for the password again. and when i type in the password, the same thing happens; the page would reload and it would ask for my password again.
could someone help to figure this out? having too many people reading my personal blog i really don't like it.


thankkkkkkks!

User avatar
Bremen
Reporter
Reporter
Posts: 748
Joined: Wed, 24 Aug 2005 5:14 pm
Location: Island of Red Mud

Post by Bremen » Fri, 19 May 2006 7:38 pm

Javascript is not the way to go. you should be using ASP/PHP/coldfusion and cookies.
"Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life."
- Terry Pratchett

User avatar
emiko08
Chatter
Chatter
Posts: 340
Joined: Sun, 29 May 2005 8:53 pm
Location: Japan

Post by emiko08 » Fri, 19 May 2006 7:55 pm

Bremen wrote:Javascript is not the way to go. you should be using ASP/PHP/coldfusion and cookies.
ASP/PHP/coldfusion and cookies?
its so confusing. i have only heard of javascript :oops:

User avatar
Bremen
Reporter
Reporter
Posts: 748
Joined: Wed, 24 Aug 2005 5:14 pm
Location: Island of Red Mud

Post by Bremen » Fri, 19 May 2006 9:27 pm

Javascript cannot "remember" that you already set the password. Also, anyone who knows how to right click -> View source will see your password.

I suggest you do a google search for "how to password protect your webpage"
"Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life."
- Terry Pratchett

User avatar
Jedi
Regular
Regular
Posts: 76
Joined: Tue, 13 Sep 2005 8:11 pm

Post by Jedi » Sat, 20 May 2006 8:35 am

Why don't you set permissions on the folder where you're website resides? Your webhost control panel should provide for this.

User avatar
emiko08
Chatter
Chatter
Posts: 340
Joined: Sun, 29 May 2005 8:53 pm
Location: Japan

Post by emiko08 » Sat, 20 May 2006 11:06 pm

Jedi wrote:Why don't you set permissions on the folder where you're website resides? Your webhost control panel should provide for this.
no it does not provide :cry:

Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “Computer, Internet, Phone & Electronics”

Who is online

Users browsing this forum: No registered users and 0 guests