OK, here’s the deal. I’ve got a mail form, check! Now, i need to make it so that you HAVE TO fill in to of the fields… this is what i got so far on the AS front:
frame 1:
stop();
//let’s stop the timeline
System.useCodepage=true;
//and make shure that we can use all sorts of internationall letters
scroll._visible = (input3.maxscroll > 1);
input3.onChanged = function() {
scroll._visible = (this.maxscroll > 1);
}//just to be “kewl”, lets hide the scrollbar if it isn’t needed.
name = “”;
email = “”;
input = “”;
//then we clear all the txt fields
input1.tabIndex = 1;
input2.tabIndex = 2;
input3.tabIndex = 3;
//lets make shure that we keep the order on that tab btn
error = “forget something?”;
//and then we make an error statement
function formcheck() { //here comes the interesting part
if ((name == null) || (name == “”)) {
name = error;
action = “”;
}//in other words, if the name box is empty… show the error message that we created!
if ((input == null) || (input == "")) {
input = error;
action = "";
}//same thing here, but with the message field
if ((name != "") && (name != error) && (input != "") && (input != error)) {
name = input1.text;
email = input2.text;
webb = input3.text;
this.gotoAndPlay(10);
}
}//now, if everyting is ok, go to that next scene where it says sending… hopefully, thats what we will be doing two.
[COLOR=Red]ALL OF THE ABOVE IS INSIDE A INSTANCE NAMED “form”[/COLOR]
frame 10: (_parent to above script, “contactform_mc”)
_root.enter.level1.motion.contact_mc.cont_level2_mc.contactform_mc.form.loadVariables(“mail.php”, “POST”);
frame 80: (same mc as above)
this.gotoAndStop(1);
mail.php
<?php
$send = “info@frameset.se”;
$subject = “Mail från hemsidan”;
$headers = "Från: " . $_POST[“name”];
$headers .= “<” . $_POST[“email”] .">
";
$headers .= "svara: " . $_POST[“email”];
$input = $_POST[“input”];
$input = strip_tags("$input");
$headers = strip_tags("$headers");
mail($send, $subject, $input, $headers);
?>
OK, problem is, it’s not going thrue!?! What have i missed/done wrong here? :q:
Also, i need some help to make it so that when it getts to the loadVariables part, it doesn’t continue untill it’s realy done with sending the variables.
:ch: after a couple of weeks… I GIVE UP! Is there anybody out there who can save me from the sleeples night :bored:
[COLOR=Red]ALL IN FMX[/COLOR]