Hallo Leute,
ich würde gerne die Auswahl einer ComboBox bzw. einer Checkbox an PHP übergeben - leider bekomme ich ein "undefined" wenn ich mir die Variable von PHP zurückgeben lasse.
Beim Textfeld funktioniert es jedoch...
Code:
stop();
//=================================
// INIT
//=================================
path = "http://www.badenerhochzeitstage.com/register/php/"; //declare path to php files
lvOut = new LoadVars(); //create lv object
lvIn = new LoadVars(); //create lv object
lvIn.onLoad = function (success) {
if(success){
//PHP variable value to textbox
trace ("Ergebnis DropDown: " + lvIn.returnDropDown);
trace ("Ergebnis CheckBox1: " + lvIn.returnCheckBox);
trace ("Ergebnis E-Mail: " + lvIn.returnEmail);
trace ("Ergebnis CheckBox2: " + lvIn.returnAgbs);
}else{
//...or notify of failure
output.text = "fail";
}
}
//=================================
// BTN
//=================================
myBtn.onRelease = function(){
//assign user-input value to lv property called years
lvOut.drop = dropDown.ComboBox.selectedIndex;
lvOut.box = checkBox.CheckBox.selectedIndex;
lvOut.email = emailLabel.text;
lvOut.agb = agbBox.CheckBox.selectedIndex;
//send to a blank window...
//lvOut.send(path + "dogyears.php","_blank");
//get results returned to lvIn
lvOut.sendAndLoad(path + "register.php", lvIn, "POST");
this.gotoAndStop(3);
}; Vielen Dank für Eure Hilfe!
lg,
Stefan