<html>
<head>
<title>
Log in
</title>
<style>
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;
}
</style>
</head>
<body background="Dance_wallpapers_211.png">
<h1 style="font-family:Comic Sans Ms;text-align="center";font-size:20pt;
color:#00FF00;>
<bR>
<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>
</h1>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<form name="login">
<h3><center><font face="arial" color="#00FF00">Username:<input type="text" name="userid"/></font></center>
<br>
<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>
</form>
<script language="javascript">
function check(form)
{
if(form.userid.value == "yakuzajevin" || form.userid.value == "YAKUZAJEVIN" && form.pswrd.value == "yakuzajevin" || form.pswrd.value == "YAKUZAJEVIN")
{
window.location.assign('file:///H:/WEBPAGE/redirect.html');
}
else
{
alert("Access Denied")
}
}
</script>
<SCRIPT LANGUAGE="JavaScript">
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.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
document.oncontextmenu=new Function("return false")
</script>
<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">
</iframe>
</body>
</html>
YakuzaJevin
0
Newbie Poster
Recommended Answers
Jump to PostIf 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.
Jump to PostWhile 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 …
All 5 Replies
YakuzaJevin
0
Newbie Poster
stbuchok
JorgeM
958
Problem Solver
Team Colleague
Featured Poster
YakuzaJevin
0
Newbie Poster
JorgeM
958
Problem Solver
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.