I'm pulling my little hair that's left out trying to figure out how I can
call a function from within a function. Here's the deal... and yes I know I
should be using PHP!
I have a password login screen for three users who have individual
pre-assigned passwords so i need some logic testing as per below
// ========START OF CODE=========
//This is the function to find out who is logging in
function validate()
{
//Change case from the input
var usrid=document.form.usrid.value.toLowerCase()
//Simple if statement for the who's logging in logic
if(usrid=="TEST") //**??THIS IS WHERE I HAVE PROBLEM 1 (FOR
SURE)??**
else
if(usrid=="") alert("ID REQUIRED!")
}
//This is the password check for the user TEST
function validateTESTIDPwd()
{
//Change case from the input
var pwd=document.form.pwd.value.toLowerCase()
//Validate password
if(pwd=="TEST") //**?? THIS IS WHERE I HAVE PROBLEM 2 (MAYBE)??**
else
alert("Password Incorrect!")
}
// ========END OF CODE=========
OK, so problem 1: How can I call the validateTESTIDPwd() function
and problem 2: After confirming the identity of user TEST I want to open up
a page in the current frame. Does anyone know how to manipulate my frames
from this point?
All help appreciated.
Cheers,
Matt