Visual Basic Build a login screen which will be passed an id and password. If th
ID: 3838179 • Letter: V
Question
Visual Basic
Build a login screen which will be passed an id and password. If the user fails to login in three tries, have them authentic based on their personal information. Authentic their mother's maiden name if they fail terminate the program after a message box stating their have failed to authenticate. If they succeed, ask them for the name of their first pet. If they fail, terminate the program. if successful, ask them to enter a new password twice, if they passwords match have them attempt to login. If they fail three times terminate the program.
This program should call at least 5 functions from various events.
Open If mismatch Application Try 3 times Success Authenticate Enter ID and ID and Password Password Success End Failed Authenticate Mother Authenticate Password Match Failed End uccess End Failed Authenticate Pet Success Enter New Password pairExplanation / Answer
MAIN PAGE.html
<html>
<form>
<input type="text" placeholder="Username" id="text1" /><br />
<input type="password" placeholder="Password" id="text2" /><br />
<input type="button" value="Login" />
</form>
<script type="text/javascript">
function validate()
{
if( document.getElementById("text1").value == "venky"
&& document.getElementById("text2").value == "venky@547" )
{
alert( "Login succeeded" );
location.href="Reset Password.html";
}
else if( count==3)
{
count++;
alert("attempting failed:");
}
else
{
alert( "Login failed! Try Again" );
location.href="PETNAME.html";
}
}
</script>
</html>
RESET PASSOWRD.html
<form>
<input type="text" placeholder="Password" id="text1" /><br />
<input type="password" placeholder="Re-|Enter Password" id="text2" /><br />
<input type="button" value="Login" />
</form>
<script type="text/javascript">
function validate()
{
if( document.getElementById("text1").value == "venky"
&& document.getElementById("text2").value == "venky" )
{
alert( "validation succeeded" );
}
else
{
alert( "Password Must be the same" );
location.href="RESET PASSOWRD.html";
}
}
</script>
PETNAME.html
<html>
<form>
<input type="text" placeholder="Enter Petname" id="text1" /><br />
<input type="button" value="Login2">
</form>
<script type="text/javascript">
function validate2()
{
if( document.getElementById("text1").value =="venkanna")
{
alert( "Petname sucessfully Verified!" );
location.href="RESET PASSWORD.html";
}
else
{
alert( "validation failed ");
}
}
</script>
</html>
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.