I'm having problems error checking my form that I built in Flash MX... What I basically want it to do it check to see which radio button is check (phone or email) and make sure that the corresponding input box on the form doesn't have a blank entry... If it does have a blank entry, then it is to display an error message. Here's my code that I have placed on the submit button... All the help and feedback would be greatly appreciated!!!!!
Code:
on (release) {
var contact = contact_by.getValue();
if (contact == "email" && email == ""
{
failed = "yes";
message = "If you want to be contacted by Email you must enter in an email address.";
gotoAndPlay(1);
}
if (contact == "phone" && phone == ""
{
failed = "yes";
message = "If you want to be contacted by Phone you must enter in a phone number.";
}
if (failed != "yes"
{
getURL("contact_send.php", "", "POST"
;
}
}
I'm new to flash actionscript and am not sure if I have everything typed correctly, but the logic is there...
Thanks in advance,
Cole![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Code:
on (release) {
var contact = contact_by.getValue();
if (contact == "email" && email == ""
failed = "yes";
message = "If you want to be contacted by Email you must enter in an email address.";
gotoAndPlay(1);
}
if (contact == "phone" && phone == ""
failed = "yes";
message = "If you want to be contacted by Phone you must enter in a phone number.";
}
if (failed != "yes"
getURL("contact_send.php", "", "POST"
}
}
I'm new to flash actionscript and am not sure if I have everything typed correctly, but the logic is there...
Thanks in advance,
Cole