i have a if statement it checks a form that has * to mark fields that need to be filled out i want my if statement ot check to see if the fields are filled in and if they are not i want it to exit the script before it moves on to the next command… i guess i could use a else if but i want to know if there is another way…
on(release){
if (SubjectTxt.text == “” or NameTxt.text == “” or EmailTxt.text == “” or MessageTxt.text == “”) {
warning.text = “Not all Fields were filled out correctly!!!”;
“THIS IS WHERE I WOULD PLACE IT”
}
}
form.loadVariables(“email.php”, “POST”);
you need an if else statement… something like this.
you don’t need to exit the script so much as utilize the if else statement to only execute the loadVariables action if the “if” part of the statement is satisfied…
hope that helps!
on (release){
if(SubjectTxt.text =="“or NameTxt.text==’’ or EmailTxt.text==”“orMessageTxt.text==”"){
warning.text=“Not all Fields were filled out correctly!!!”;
else {form.loadVariables(“email.php”,“POST”);