Hi everyone...
I'm a rookie volunteering for a charity. I'm trying to have a password checking program that will validate the password before continuing
I'm trying to have a message appear on the screen if an invalid password is entered. - by using hidden/visibility.
I've created a gif saying "Invalid Password" so that there is not a textbox on the screen as the users are not savvy at all. However this gif always shows.
Here's a scaled pgm to illustrate what I'm trying to do..
Any help is greatly appreciated as I have no other people who are programmer types. I've tried multiple versions of this ... to no avail
I've rename our organization to - so don't be alarmed if you don't see the gif. I'm just trying to find how to use hidden visible and despite many, many google searches - I can't get this to work.
Thank you!!!!!!!!!!!!!1
Cyberter
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>xxx</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css">
</head>
<script language="Javascript">
<!--
function NoError() {
document.getElementById(ShowErr).style.visibility="hidden";
}
function ShowError() {
document.getElementById(ShowErr).style.visibility="visible";
}
//=============================================================================
function Pwd3() {
//=============================================================================
errMsg2 = false
errTxt2 = ""
var u = "Password1";
var b = "Password2";
var z=false;
//This is for testing
// this is for testing
alert(document.PwdForm3.Pwd.value);
if ((document.PwdForm3.Pwd.value==u) || (document.PwdForm3.Pwd.value==b)) {
z=true
}
if ((z==false)) {
// document.getElementById(thepic).style.visibility = "visible";
ShowErr.style.visibility="visible";
return false;
}
}
//-->
</script>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="NoError()" >
<form method="POST" onSubmit="return Pwd3()" name="PwdForm3" action=" >
<b><font face="Arial">Please enter the password to access this webpage </font></b>
<span style="background-color: #cccccc">
<input type="password" name="Pwd" size="20">
</span>
<input type="submit" value="Submit" name="B1">
<input type="reset" value="Reset" name="B2"></p>
<input type=hidden name="redirect" value="
<span ID="ShowErr">
<img border="0" src=" width="299" height="22">
</span>
</form>
</body>
</html>
I'm a rookie volunteering for a charity. I'm trying to have a password checking program that will validate the password before continuing
I'm trying to have a message appear on the screen if an invalid password is entered. - by using hidden/visibility.
I've created a gif saying "Invalid Password" so that there is not a textbox on the screen as the users are not savvy at all. However this gif always shows.
Here's a scaled pgm to illustrate what I'm trying to do..
Any help is greatly appreciated as I have no other people who are programmer types. I've tried multiple versions of this ... to no avail
I've rename our organization to - so don't be alarmed if you don't see the gif. I'm just trying to find how to use hidden visible and despite many, many google searches - I can't get this to work.
Thank you!!!!!!!!!!!!!1
Cyberter
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>xxx</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css">
</head>
<script language="Javascript">
<!--
function NoError() {
document.getElementById(ShowErr).style.visibility="hidden";
}
function ShowError() {
document.getElementById(ShowErr).style.visibility="visible";
}
//=============================================================================
function Pwd3() {
//=============================================================================
errMsg2 = false
errTxt2 = ""
var u = "Password1";
var b = "Password2";
var z=false;
//This is for testing
// this is for testing
alert(document.PwdForm3.Pwd.value);
if ((document.PwdForm3.Pwd.value==u) || (document.PwdForm3.Pwd.value==b)) {
z=true
}
if ((z==false)) {
// document.getElementById(thepic).style.visibility = "visible";
ShowErr.style.visibility="visible";
return false;
}
}
//-->
</script>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="NoError()" >
<form method="POST" onSubmit="return Pwd3()" name="PwdForm3" action=" >
<b><font face="Arial">Please enter the password to access this webpage </font></b>
<span style="background-color: #cccccc">
<input type="password" name="Pwd" size="20">
</span>
<input type="submit" value="Submit" name="B1">
<input type="reset" value="Reset" name="B2"></p>
<input type=hidden name="redirect" value="
<span ID="ShowErr">
<img border="0" src=" width="299" height="22">
</span>
</form>
</body>
</html>