Man, I’m sorry to be such a pain in the butt on this board. When I finally figure stuff out, I promise to give back and stick around and answer questions!
Here is my problem:
When I run this code:
[code]
function fieldValidation()
{
var result=true; // Return Value
alert(“Test 1 – Made it this far!”);
CheckAccount();
CheckPatient();
alert(“Last Test!”);
}
function CheckAccount()
{
alert(“Test 3 – Made it this far!”);
}
function CheckPatient()
{
if (cc_form.PTLName.value == “”)
{
alert(“Please enter patient LAST NAME.”);
cc_form.PTLName.focus();
return (false);
}
}
It prints:
“Test 1 – Made it this far!”
“Test 3 – Made it this far!”
“Please enter patient LAST NAME”
“Last Test!”
I’m not sure exactly how to do this. But is there a way to make the function STOP, or a QUIT, if the first condition is met?
Like basically, as you can see above, the function “CheckPatient”. Is there a way that I can say like…
If CheckPatient = FALSE Then QUIT?
I don’t want it to print “Last Test!”, if the condition in CheckPatient is not met.
Anyone have any idea?
And like I said, when I’ve got this whole thing figured out, I promise to stick around and help answer questions to other newbies in my current situation!!!
Thanks!!!
Todd