bsmother
04-28-2006, 02:44 PM
Hello All,
I was hoping that someone could help me modify this script, you are probably very familar with it already.
<SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
function LogIn(){
loggedin=false;
username="";
password="";
username=prompt("Username:","");
username=username.toLowerCase();
password=prompt("Password:","");
password=password.toLowerCase();
if (username=="guest" && password=="login") {
loggedin=true;
window.location="home-page.html";
}
if (username=="guest2" && password=="login2") {
loggedin=true;
window.location="home-page2.html";
}
if (loggedin==false) {
alert("Invalid login!");
}
}
// End -->
</SCRIPT>
<BODY>
<center>
<form><input type=button value="Login!" onClick="LogIn()"></form>
</center>
<p><center>
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>
I really like the sript and love the idea that mulitple users can be added, but I would like a few things to be done.
First I would like the password to be showed with * when typed in so when you are typing its not shown.
Second when you click on login, I would like it to open in a new window.
I know there is a way to do this, I figured it out back a few months ago but forgot how I did it, now its just a mess.
You could help it would be highly appreciated. Thank you!! :)
bsmother
I was hoping that someone could help me modify this script, you are probably very familar with it already.
<SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
function LogIn(){
loggedin=false;
username="";
password="";
username=prompt("Username:","");
username=username.toLowerCase();
password=prompt("Password:","");
password=password.toLowerCase();
if (username=="guest" && password=="login") {
loggedin=true;
window.location="home-page.html";
}
if (username=="guest2" && password=="login2") {
loggedin=true;
window.location="home-page2.html";
}
if (loggedin==false) {
alert("Invalid login!");
}
}
// End -->
</SCRIPT>
<BODY>
<center>
<form><input type=button value="Login!" onClick="LogIn()"></form>
</center>
<p><center>
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>
I really like the sript and love the idea that mulitple users can be added, but I would like a few things to be done.
First I would like the password to be showed with * when typed in so when you are typing its not shown.
Second when you click on login, I would like it to open in a new window.
I know there is a way to do this, I figured it out back a few months ago but forgot how I did it, now its just a mess.
You could help it would be highly appreciated. Thank you!! :)
bsmother