I still haven't been able to give your file a lot of attention but I can give you some things to get you closer to a working form.
First I'm really not sure why you have the code you do for the reset button. You have:
on (release) {
getURL("contact.php", "_blank", "GET");
name = "Your Name:";
phone = "Your Phone:";
company = "Your Company:";
email = "Your Email:";
message = "Message:";
}
- on (release) {
- getURL("contact.php", "_blank", "GET");
- name = "Your Name:";
- phone = "Your Phone:";
- company = "Your Company:";
- email = "Your Email:";
- message = "Message:";
- }
First of all you don't have a file contact.php. Even if you do, it isn't going to accomplish what you want with the reset button. To reset you simply want to make your text field variables blank. This is sufficient to do that:
on (release){
name = "";
phone = "";
company = "";
email = "";
message = "";
}
- on (release){
- name = "";
- phone = "";
- company = "";
- email = "";
- message = "";
- }
For your text fields one thing I would suggest is change your fields from multi-line to single-line except for the Message field. I would also suggest putting in some character limits. Your maximum characters are all set to 0. I would change them to approx 30 except for message which I would say around 500 would be fine.
For your submit button you don't really need this
var name = this._parent.name.text
var company = this._parent.company.text
var phone = this._parent.phone.text
var email = this._parent.email.text
var message = this._parent.message.text
- var name = this._parent.name.text
- var company = this._parent.company.text
- var phone = this._parent.phone.text
- var email = this._parent.email.text
- var message = this._parent.message.text
also for error.gotoAndPlay("error"); and error.gotoAndPlay("send"); lose "error." Just use the gotoAndPlay. In prior posts above "error" is the instance of a movieclip I loaded. You don't have an error movieclip.
After those changes your errors start to display but there is still a problem. If you leave all your fields blank and click submit it should take you to the error clip but it doesn't it takes you to sent. If you add a trace on your variables you'll see that initially it's adding some HTML <p> tags to your text fields and I'm not sure why. Unfortunately I've been too busy to give it any kind of time to trouble shoot. That's as far as I got and won't have any time to look at it again until perhaps this weekend. But that should give you some things to go with.
Also check your Actions on your error and sent tweens. I'm think some of your gotoAndPlay's are set to the wrong frames. In particular the close button.
I'd also suggest moving your error tweens farther on the timeline to where your text fields are hidden. It looks rather amateurish to display the errors over the text fields.
I know that's not a lot but hope it helps you narrow things down.
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.