Log in
 body {
    width: 1000px;
    margin: 0 auto;
    text-align: justify;

body, .text, .justify, tr {
    color : #f0f0f0;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: normal;

.justify {
    text-align: justify;
<body background="Dance_wallpapers_211.png">
<h1 style="font-family:Comic Sans Ms;text-align="center";font-size:20pt;
<center><font face="arial" color="#00FF00">Welcome to RAZER ZONE</font></center>
<center><font face="arial" color="white">FOR </font><font face="arial" color="#00FF00">GAMERS. </font><font face="arial" color="white">BY </font><font face="arial" color="#00FF00">GAMERS.</font>
<form name="login">
<h3><center><font face="arial" color="#00FF00">Username:<input type="text" name="userid"/></font></center>
<center><font face="arial" color="#00FF00">Password:<input type="password" name="pswrd"/></font></center></h3>
<center><input type="button" onclick="check(this.form)" value="Login"/>
<input type="reset" value="Cancel"/></center>
<script language="javascript">
function check(form)
if(form.userid.value == "yakuzajevin" || form.userid.value == "YAKUZAJEVIN" && form.pswrd.value == "yakuzajevin" || form.pswrd.value == "YAKUZAJEVIN")
alert("Access Denied")
var message="Please Log in!";
function clickIE() {if (document.all) {alert(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {alert(message);return false;}}}
if (document.layers) 

document.oncontextmenu=new Function("return false")
<center><h2><font face = " arial " color = " white ">Note: <font face="arial" color="#00FF00">case</font> sensitive!</font></h2>
<iframe src="footer.html" name="mainframe" height="200" width="1024" frameborder="0" allowtransparency="true" scrolling="no">

Edited by YakuzaJevin: when i use window.location.assign the value needed for my password is being ignored, eg. password is yakuzajevin, but even i dont use yakuzajevin, it will direct you to the homepage

4 Years
Discussion Span
Last Post by JorgeM

when i use window.location.assign, the value needed for my password is being ignored, you can use any char, for the password even if there is a value assigned, for example, the value assigned is "yakuzajevin", even if you didn't use "yakuzajevin", the page will direct you to the homepage,

please help,


If you are going to do any sort of security, do it through server side code. I can bypass this in half a second. You can't prevent someone from viewing source and finding the username and password.


While I firmly agree that using javascript for a login is not really a good idea, your issue is that you need another two sets of parenthesis... the problem is that your current if..else is evaluating as TRUE using your logic even if the pasword is incorrect...

[edit]... adding picture because I was unable to include sample code..


Edited by JorgeM


Well guys thanks for the reponse :D, i will use this codes for my 7yrs old brother for his project :D, so no need for service side code XD

thanks for the reply :D

Edited by YakuzaJevin


Ok, glad we were able to help and solve your issue with the if statement and the use of AND and OR.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.