Can someone help me with my codes about the log in using javascript, everytime i log in it opens a new window for the homepage, but i want it to be in the same window, thank you :D
<html>
<head>
<title>
Login page
</title>
</head>
<body background="black_background_metal_hole_very_small-wallpaper-2560x1600.jpg">
<h1 style="font-family:Comic Sans Ms;text-align="center";font-size:20pt;
color:#00FF00;>
<bR>
<center><font face="dodger" color="red">Welcome to Gamebook</font></center>
</h1>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<form name="login">
<h3><center><font face="dodger" color="red">Username:<input type="text" name="userid"/></font></center>
<br>
<center><font face="dodger" color="red">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.open('file:///D:/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><font face = " dodger " color = " red ">note: case sensitive!</font>
</body>
</html>