PDA

View Full Version : combobox values are undefined in PHP


lelales
05-17-2006, 08:52 PM
I have created a combox in a form that is processed by a php file and mailed to me. The problem is that the combobox always come up with a value of "undefined".

I have given my combox an instance name in the component parameter field. This istance name also shows up in the property field as well.

I can't figure it out.

here's my file: http://www.caillouette.com/nola/component_form.zip


here's my code: stop();
var LV_out:LoadVars = new LoadVars();
var LV_in:LoadVars = new LoadVars();
LV_in.onLoad = function(success) {
if (success) {
gotoAndPlay("Display");
} else {
trace ("Error loading data into flash");
gotoAndPlay("Error");
}
}
//----------
submit_mc.onRelease = function() {
var custname:String= Fcustname.text;
LV_out.billing = Fbilling.selectedData;
LV_out.apptype = Fapptype.selectedData;
LV_out.loantype = Floantype.selectedData;
var inputValue:String = input_txt.text;
trace(LV_out.billing);
trace(LV_out.apptype);
trace(LV_out.loantype);
trace(inputValue);
LV_out.sendAndLoad("register4.php", LV_in, "GET");
gotoAndStop("Loading");
mySO.data.voted = "yes";
mySO.flush();
};
//----------



I don't know if "selectedData" is right for the combo box, but it works for the radio buttons.

thanks
__________________
Maggot Brain

Flash Gordon
05-17-2006, 09:38 PM
might be a good idea to continue this in you other thread about this....Did you get my link that I posted for you?

lelales
05-17-2006, 09:44 PM
Yes I received your link and used the code. I have a lot of fields, so I need to use POST, but currently I'm using GET until I get it all ironed out.

I am just surprised by the lack of info on the Flash site and the help files.

Been working on this off and on all day.

Should be easy, but it isn't, or maybe I'm just dumb . . . who said that?:eek:

tg
05-17-2006, 09:45 PM
use:

myCombo.selectedItem.data;
//or
myCombo.selectedItem.label;

lelales
05-17-2006, 10:29 PM
You both helped me out immensely.