Please help with Pasword protected page Java script..!
Can someone help me to edit this code...? PLEASE. it will take just 3 minutes...:)
NOTE: this page has "User name" and "password" to login or redirect to another page.. But I dont need the password option.. I just need the " user name" , something very easy..
I just want he visitor to Enter his/her "user name" and press login and the website will take him/her to the page that will be designed for this specific user..
So, I just want to have unlimited "user names" but NO passwords....
Can SOMEONE HELP ME WITH THIS... :)
======================
Here is the code to edit:
===============================
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<SCRIPT LANGUAGE="JavaScript">
<!-- The JavaScript Source -->
<!-- Begin
function Login(){
var done=0;
var username=document.login.username.value;
username=username.toLowerCase();
var password=document.login.password.value;
password=password.toLowerCase();
if (username=="member1" && password=="password1") { window.location="page1.html"; done=1; }
if (username=="member2" && password=="password2") { window.location="page2.html"; done=1; }
if (username=="member3" && password=="password3") { window.location="page3.html"; done=1; }
if (done==0) { alert("Invalid login!"); }
}
// End -->
</SCRIPT>
</head>
<body>
<center>
<form name=login>
<table width=225 border=0 cellpadding=0>
<tr><td colspan=2><center><font size="+2"><b>Members-Only Area!</b></font></center></td></tr>
<tr><td>Username:</td><td><input type=text name=username></td></tr>
<tr><td>Password:</td><td><input type=text name=password></td></tr>
<tr><td colspan=2 align=center><input type=button value="Login!" onClick="Login()"></td></tr>
</table>
</form>
<p> </p>
</center>
<p>
<p>
</body>
</html>
Re: Please help with Pasword protected page Java script..!
This is a Java forum; Java and Javascript are two quite different languages; better try again in a Javascript forum.
kind regards,
Jos
Re: Please help with Pasword protected page Java script..!
RE: This is a Java forum; Java and Javascript are two quite different languages; better try again in a Javascript forum......"
And were I can find a Java Script forum...? :(-:
Re: Please help with Pasword protected page Java script..!
Quote:
Originally Posted by
boyfrom75
And were I can find a Java Script forum...? :(-:
I don't know but I'm (almost) sure that Google can help you out.
kind regards,
Jos