To Whom It May Concern:
In the creation of my webpage, I created a section that requires a password. I used the following code:
function access()
{
var password = prompt("Please enter your password."
if(password == "1J2A0Y5"
{window.location = "pwfiles.htm";}
else
{window.location = "error.htm";}
}
However, I need a way to hide this section of code that contains the password information since anyone can just view my source and take it. So, if anyone could suggest how I should do this, I would appreciate it. Or if you have a better or more secure method please let me know. Thanks!
kanin
In the creation of my webpage, I created a section that requires a password. I used the following code:
function access()
{
var password = prompt("Please enter your password."
if(password == "1J2A0Y5"
{window.location = "pwfiles.htm";}
else
{window.location = "error.htm";}
}
However, I need a way to hide this section of code that contains the password information since anyone can just view my source and take it. So, if anyone could suggest how I should do this, I would appreciate it. Or if you have a better or more secure method please let me know. Thanks!
kanin