michanagel
Technical User
Hi,
I've created a php email form which works fine, and I have action script attached on the 'submit' button which checks for certain values in the input fields..
There are only 3 input fields:
1. Name field - variable assigned = 'name_input' - Input text / single line
2. email field - variable assigned = 'email' - Input text / single line
3. Message field - variable assigned = 'message_input' - Input text / multi line
All input text field are located in a movieclip called 'form'.
Now, on the send button i check if certain criteria is met...
Code:
on(release){
if ((_parent.form.name_input.length<1) or (_parent.form.message_input.length<1)) {
_parent.error_message.gotoAndPlay("s1");
}
else{
_parent.form.loadVariables("email.php", "POST");
}
}
--> I cut this code down a little bit because the rest of the code works but those two conditions are just not checked by flash...
Even if I leave both the Name and Message field empty it will still send the message and not (as it should) go and play the error message...
What am I doing wrong here ?
As always, thanx for your help and advise in advance !
Mike
I've created a php email form which works fine, and I have action script attached on the 'submit' button which checks for certain values in the input fields..
There are only 3 input fields:
1. Name field - variable assigned = 'name_input' - Input text / single line
2. email field - variable assigned = 'email' - Input text / single line
3. Message field - variable assigned = 'message_input' - Input text / multi line
All input text field are located in a movieclip called 'form'.
Now, on the send button i check if certain criteria is met...
Code:
on(release){
if ((_parent.form.name_input.length<1) or (_parent.form.message_input.length<1)) {
_parent.error_message.gotoAndPlay("s1");
}
else{
_parent.form.loadVariables("email.php", "POST");
}
}
--> I cut this code down a little bit because the rest of the code works but those two conditions are just not checked by flash...
Even if I leave both the Name and Message field empty it will still send the message and not (as it should) go and play the error message...
What am I doing wrong here ?
As always, thanx for your help and advise in advance !
Mike