Aloha,
(Flash8)I have a form, with aComboBox.
It is populated with Countries in the labels and email addresses in the data.
I want the data (email adresses) to go to the php file, not the labels. In the php file it would use the addresses to mail the form to.
I can trace the data, but cannot get it into the php file.
Anyone have an answer?
AS code:
country_txt.addItem({label:“CHOOSE YOUR COUNTRY”});
country_txt.addItem({data:“ega-maui@hawaiiantel.net”, label:“Headquarters/International”});
// establish component listener
lo = new Object();
lo.change = function (evt) {
trace(evt.target.selectedItem.data);
}
country_txt.addEventListener(“change”, lo);
_lv = new LoadVars();
_lv.onLoad = function() {
if (!this.faultCode) {
response_txt.text = “There was a problem sending your message.”;
} else {
response_txt.text = “Thanks – your message has been sent.”;
_root.nextFrame();
}
};
send_btn.onRelease = function() {
response_txt.text = ‘’;
var ok = true;
_lv.name = name_txt.text;
_lv.email = email_txt.text;
_lv.subject = subject_txt.text;
_lv.country = country_txt.data;
_lv.message = message_txt.text;
if (email_txt.text == '' || email_txt.text.indexOf('@') == -1) {
response_txt.text = "Please enter your email address";
ok = false;
} else _lv.email = email_txt.text;
if (subject_txt.text == '') {
response_txt.text = "Please enter a subject";
ok = false;
} else _lv.subject = subject_txt.text;
if (country_txt.text == 'CHOOSE YOUR COUNTRY') {
response_txt.text = "Please choose a country";
ok = false;
} else _lv.country = country_txt.data;
if (message_txt.text == '') {
response_txt.text = "You haven't typed in a message";
ok = false;
} else _lv.message = message_txt.text;
if (ok) {
response_txt.text = "Sending...";
_lv.sendAndLoad("sendemail.php", _lv, "POST");
}
};
Selection.setFocus(“name_txt”);