So, im trying to create a simple generic login for a group to access a specific part of a website I have running through google sites. And i mashed two scripts i did as training, and some personal html know-how. to get this. but when i try to login it doesnt work. Please help!
Code:<html> <HEAD> <SCRIPT LANGUAGE="JavaScript"> function LogIn(){ loggedin=false; username=""; password=""; username=username.toLowerCase(); password=password.toLowerCase(); if (username=="jeremy" && password=="js") { loggedin=true; window.open("http://www.facebook.com"); } if (username=="aracelie" && password=="am") { loggedin=true; window.open("http://www.facebook.com"); } if (loggedin==false) { alert("Invalid login!"); } } </SCRIPT> <BODY> <form> <p>Username:</p> <input type="text" name="username"> <p>Password:</p> <input type=password name="password"><br> <form><input type=button value="Login" onClick="LogIn()"></form> </form> </body> </html>


Reply With Quote

Bookmarks