Flash email code
I have some code for emailing in flash but it doesnt work, i think im going wrong as its asking for more than one thing out of the array, could anyone help me clean it up or tell me how to fix it? it would be really appricitated thanks
Also i have removed the inet adress
Code:
elements = new Array();
elements[0] = this.text_field_2;
elements[1] = this.text_field_3;
elements[2] = this.text_field_4;
elements[3] = this.sendbutton;
mailData = new LoadVars();
var i = elements.length;
while (i--) {
switch (this.elements[i].type) {
mailData[elements[i].name] = escape(elements[i].field.text);
elements[i].field.type = "dynamic";
elements[i].field.selectable = false;
break;
}
}
mailData.onLoad = function() {
this.sent = Number(this.sent);
if (this.sent == 1) {
trace("Message Sent successfully");
} else {
trace("Message could not be sent");
}
trace(this.status);
};
var mailServer = "http://.../sendMail.php";
mailData.sendAndLoad(mailServer, mailData, "POST");
__________________
[URL=http://csowned.com][img]http://img171.imageshack.us/img171/8030/csowned3xw.png[/img][/URL]
[IMG]http://img468.imageshack.us/img468/70/untitled17hy.png[/IMG]
|