gildash2
02-23-2004, 11:20 AM
<SCRIPT LANGUAGE="JavaScript">
function Getstats()
{
window.status=('Attempting to Login to user area.')
var AccId;
var iName;
AccId = document.iAccInput.iAccID.value;
iName = document.iAccInput.iName.value;
if (iName == "" || AccId == "")
{
alert(' You have forgotten to put either your:\n-Password\n-Login Name');
window.status=('Attempt to log in has failed');
}
else
{
if (iName == "Kaade" && AccId == "seaweed")
{
window.iframe.location="http://www.yahoo.com";
window.status=('Hello '+iName+'. Welcome');
document.getElementById('guest').value = iName;
alert('Password is correct\ncongrats.\n');
}
else
{
alert('Password is incorrect\nTry again.\n');
window.iframe.location="http://www.google.com";
window.status=('Attempt to log in has failed');
}
}
}
</SCRIPT>
</HEAD>
<table border="1" bordercolor="ff0000" height="16" width="50"style="position:absolute; top:112px; left:743px" cellspacing="0" cellpadding="0" bgcolor="ff0000"><td bgcolor="0000" bordercolor="ff0000" width="50" height="15"><font color="0" size="1"><a href=".html" style="cursor: crosshair">_____Registration_____</a></font></td></table>
<FORM NAME="iAccInput" target="iframe">
<CENTER>
<TABLE style="position:absolute; top:45px; left:743px"
BORDER="1" bordercolor="ff0000" CELLPADDING="0" CELLSPACING="0" BGCOLOR="#000000"><tr><td bgcolor="ff0000" width="50"><font color="000" size="1"><center>Login:</center></font></caption>
</td></tr><TR>
<TD ALIGN="RIGHT"><FONT SIZE="1" COLOR="#FF0000">User
Name:</FONT><BR><BR>
<FONT SIZE="1" COLOR="#FF0000">Password:</FONT></TD>
<TD><INPUT TYPE="TEXT" style="border: solid 2px #ff0000" size="10" style="background:0" style="color:ff0000" NAME="iName" MAXLENGTH="15"><br>
<INPUT style="border: solid 2px #ff0000" width="5" size="10" style="background:0" style="color:ff0000" NAME="iAccID" MAXLENGTH="15" HEIGHT="30"></TD>
<TD><INPUT style="border: solid 2px #000000" TYPE="BUTTON" VALUE=" Login " style="background:0" onClick="Getstats()" style="color:ff0000" HEIGHT="40" WIDTH="30"><BR>
<INPUT style="border: solid 2px #000000" TYPE="RESET" size="5" style="background:0" style="color:ff0000" VALUE=" Reset " onClick="window.status=('RESET: Please enter your USERNAME and ACCOUNT ID.')" WIDTH="50">
</TD></TR></TABLE></CENTER>
sorrry for the legnth of the code above, but i have got to ask this question because it is literally driving me insane, you know, coo coo ca ca. i wrote the code above earlier today but i have two problems with it, first: the password does not appear as ****** when typed. second: if someone looks at the code, it would be easily bipassed, so wat i need from you experts is, please, a code to help with both of my problems, the first being to make the password appear as **** when written in the password box, and second a security method that would help me hide the password and logins from some1 who would be looking at the source
thank you and all and any help will be appreciated thank u
function Getstats()
{
window.status=('Attempting to Login to user area.')
var AccId;
var iName;
AccId = document.iAccInput.iAccID.value;
iName = document.iAccInput.iName.value;
if (iName == "" || AccId == "")
{
alert(' You have forgotten to put either your:\n-Password\n-Login Name');
window.status=('Attempt to log in has failed');
}
else
{
if (iName == "Kaade" && AccId == "seaweed")
{
window.iframe.location="http://www.yahoo.com";
window.status=('Hello '+iName+'. Welcome');
document.getElementById('guest').value = iName;
alert('Password is correct\ncongrats.\n');
}
else
{
alert('Password is incorrect\nTry again.\n');
window.iframe.location="http://www.google.com";
window.status=('Attempt to log in has failed');
}
}
}
</SCRIPT>
</HEAD>
<table border="1" bordercolor="ff0000" height="16" width="50"style="position:absolute; top:112px; left:743px" cellspacing="0" cellpadding="0" bgcolor="ff0000"><td bgcolor="0000" bordercolor="ff0000" width="50" height="15"><font color="0" size="1"><a href=".html" style="cursor: crosshair">_____Registration_____</a></font></td></table>
<FORM NAME="iAccInput" target="iframe">
<CENTER>
<TABLE style="position:absolute; top:45px; left:743px"
BORDER="1" bordercolor="ff0000" CELLPADDING="0" CELLSPACING="0" BGCOLOR="#000000"><tr><td bgcolor="ff0000" width="50"><font color="000" size="1"><center>Login:</center></font></caption>
</td></tr><TR>
<TD ALIGN="RIGHT"><FONT SIZE="1" COLOR="#FF0000">User
Name:</FONT><BR><BR>
<FONT SIZE="1" COLOR="#FF0000">Password:</FONT></TD>
<TD><INPUT TYPE="TEXT" style="border: solid 2px #ff0000" size="10" style="background:0" style="color:ff0000" NAME="iName" MAXLENGTH="15"><br>
<INPUT style="border: solid 2px #ff0000" width="5" size="10" style="background:0" style="color:ff0000" NAME="iAccID" MAXLENGTH="15" HEIGHT="30"></TD>
<TD><INPUT style="border: solid 2px #000000" TYPE="BUTTON" VALUE=" Login " style="background:0" onClick="Getstats()" style="color:ff0000" HEIGHT="40" WIDTH="30"><BR>
<INPUT style="border: solid 2px #000000" TYPE="RESET" size="5" style="background:0" style="color:ff0000" VALUE=" Reset " onClick="window.status=('RESET: Please enter your USERNAME and ACCOUNT ID.')" WIDTH="50">
</TD></TR></TABLE></CENTER>
sorrry for the legnth of the code above, but i have got to ask this question because it is literally driving me insane, you know, coo coo ca ca. i wrote the code above earlier today but i have two problems with it, first: the password does not appear as ****** when typed. second: if someone looks at the code, it would be easily bipassed, so wat i need from you experts is, please, a code to help with both of my problems, the first being to make the password appear as **** when written in the password box, and second a security method that would help me hide the password and logins from some1 who would be looking at the source
thank you and all and any help will be appreciated thank u