Hi,
Im having a strange phenomenon. I have a comments box on one of my sites. I have two buttons on the page. One is called SEND and the is called CLEAR. I have an if else statement in the action script which say, if all the fields are full, go to next frame 2. On frame 2 i have a message stating that the email has been sent.
Here is the code for the send button:
on (release) {
if (name eq “” or subject eq “” or message eq “” or email eq “”) {
stop();
} else {
loadVariablesNum (“form.php”, 0, “POST”);
gotoAndStop(2);
}
}
Here is the code for the CLEAR button:
on (release) {
name = “”;
subject="";
message="";
email="";
}
Here is the strange thing. Once the page is completely open, i click on send, it still takes me the frame 2, even though there is no text in the comments or any other fields. As you can see in the code, it should not do that. But once i click on the CLEAR button, and then click on the send button, it does not go to the frame 2. Now it only goes to frame 2, when all the fields are filled up.
I dont understand whats wrong with this.
Can anyone please help me.