HI,
I have followed some very good instructions on variables and passing them to php and all seems to work fine except one value.....
I am creating an online form using flash and would like a drop down box of values so that the user can select "area of interest".
So after following this
http://www.kirupaforum.com/forums/showthread.php?t=57254 and looking at this
http://www.ozzu.com/ftopic26183.html i finally had this
stop();
name = "";
email = "";
company = "";
website = "";
address = "";
address2 = "";
postcode = "";
tel = "";
enquiry = "";
fax = "";
emailerror._visible = false;
//Add items to list.
this.myComboBox.addItem({data:1, label:"Choose One"});
this.myComboBox.addItem({data:2, label:"Purees"});
this.myComboBox.addItem({data:3, label:"Sauces"});
this.myComboBox.addItem({data:4, label:"Injectors"});
this.myComboBox.addItem({data:5, label:"Chilli Chocolate"});
this.myComboBox.addItem({data:6, label:"Gift Packs"});
//Lister.
labelArray = new Array();
dataArray = new Array();
for (i = 0; i < mycomboBox.getLength()-1; i++) {
labelArray[i] = mycomboBox.getItemAt(i).label;
dataArray[i] = mycomboBox.getItemAt(i).data;
}
//Get Selected items.
var selectedLabel = mycomboBox.getSelectedItem().label;
var selectedData = mycomboBox.getSelectedItem().data;
//url to send the data to.
submiturl = "test.php";
//event function.
function rideOut(){
pimpRide = new LoadVars();
pimpRide.passenger1 = _root.name;
pimpRide.passenger2 = _root.email;
pimpRide.passenger3 = _root.company;
pimpRide.passenger4 = _root.website;
pimpRide.passenger5 = _root.address;
pimpRide.passenger6 = _root.address2;
pimpRide.passenger7 = _root.postcode;
pimpRide.passenger8 = _root.tel;
pimpRide.passenger9 = _root.enquiry;
pimpRide.passenger10 = _root.fax;
pimpRide.passenger11 = mycomboBox.getSelectedItem.label;
pimpRide.send(submiturl,0,"post");
}
- stop();
- name = "";
- email = "";
- company = "";
- website = "";
- address = "";
- address2 = "";
- postcode = "";
- tel = "";
- enquiry = "";
- fax = "";
- emailerror._visible = false;
- //Add items to list.
- this.myComboBox.addItem({data:1, label:"Choose One"});
- this.myComboBox.addItem({data:2, label:"Purees"});
- this.myComboBox.addItem({data:3, label:"Sauces"});
- this.myComboBox.addItem({data:4, label:"Injectors"});
- this.myComboBox.addItem({data:5, label:"Chilli Chocolate"});
- this.myComboBox.addItem({data:6, label:"Gift Packs"});
- //Lister.
- labelArray = new Array();
- dataArray = new Array();
- for (i = 0; i < mycomboBox.getLength()-1; i++) {
- labelArray[i] = mycomboBox.getItemAt(i).label;
- dataArray[i] = mycomboBox.getItemAt(i).data;
- }
- //Get Selected items.
- var selectedLabel = mycomboBox.getSelectedItem().label;
- var selectedData = mycomboBox.getSelectedItem().data;
- //url to send the data to.
- submiturl = "test.php";
- //event function.
- function rideOut(){
- pimpRide = new LoadVars();
- pimpRide.passenger1 = _root.name;
- pimpRide.passenger2 = _root.email;
- pimpRide.passenger3 = _root.company;
- pimpRide.passenger4 = _root.website;
- pimpRide.passenger5 = _root.address;
- pimpRide.passenger6 = _root.address2;
- pimpRide.passenger7 = _root.postcode;
- pimpRide.passenger8 = _root.tel;
- pimpRide.passenger9 = _root.enquiry;
- pimpRide.passenger10 = _root.fax;
- pimpRide.passenger11 = mycomboBox.getSelectedItem.label;
- pimpRide.send(submiturl,0,"post");
- }
and then this on my button
on(release){
rideOut();
}
- on(release){
- rideOut();
- }
so all seems to work fine when i send the form to my php apart from the ComboBox value is showing in my email as undefined?
any ideas