Stuck sending ComboBox values to php?

  • fusedfiction
  • Born
  • Born
  • fusedfiction
  • Posts: 1
  • Loc: Tamworth

Post 3+ Months Ago

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

Code: [ Select ]
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");
}
  1. stop();
  2. name = "";
  3. email = "";
  4. company = "";
  5. website = "";
  6. address = "";
  7. address2 = "";
  8. postcode = "";
  9. tel = "";
  10. enquiry = "";
  11. fax = "";
  12. emailerror._visible = false;
  13. //Add items to list.
  14. this.myComboBox.addItem({data:1, label:"Choose One"});
  15. this.myComboBox.addItem({data:2, label:"Purees"});
  16. this.myComboBox.addItem({data:3, label:"Sauces"});
  17. this.myComboBox.addItem({data:4, label:"Injectors"});
  18. this.myComboBox.addItem({data:5, label:"Chilli Chocolate"});
  19. this.myComboBox.addItem({data:6, label:"Gift Packs"});
  20. //Lister.
  21. labelArray = new Array();
  22. dataArray = new Array();
  23. for (i = 0; i < mycomboBox.getLength()-1; i++) {
  24.    labelArray[i] = mycomboBox.getItemAt(i).label;
  25.    dataArray[i] = mycomboBox.getItemAt(i).data;
  26. }
  27. //Get Selected items.
  28. var selectedLabel = mycomboBox.getSelectedItem().label;
  29. var selectedData = mycomboBox.getSelectedItem().data;
  30. //url to send the data to.
  31. submiturl = "test.php";
  32. //event function.
  33. function rideOut(){
  34.      pimpRide = new LoadVars();
  35.      pimpRide.passenger1 = _root.name;
  36.      pimpRide.passenger2 = _root.email;
  37.      pimpRide.passenger3 = _root.company;
  38.      pimpRide.passenger4 = _root.website;
  39.      pimpRide.passenger5 = _root.address;
  40.      pimpRide.passenger6 = _root.address2;
  41.      pimpRide.passenger7 = _root.postcode;
  42.      pimpRide.passenger8 = _root.tel;
  43.      pimpRide.passenger9 = _root.enquiry;
  44.      pimpRide.passenger10 = _root.fax;
  45.      pimpRide.passenger11 = mycomboBox.getSelectedItem.label;
  46.      pimpRide.send(submiturl,0,"post");
  47. }


and then this on my button

Code: [ Select ]
on(release){
     rideOut();
}
  1. on(release){
  2.      rideOut();
  3. }


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
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 15 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.