listBox + php question

Hey guys…lame question here, but I’ve been away from flash for a while:

I have an order form that sends its vars to a php file which formats the data and then mails it to an address. All my text inputs work fine and show up in the email… however I am using a list box component and cannot seem to get its value set to a var and then sent to the php.

here is the AS I am using (for the submit button), very simple:


on (release) {
	jumpType.getSelectedItem = "jumpType";
	if (name eq "" or address eq "" or city eq "" or phone eq "" or rentalDate eq "") {
		gotoAndStop(2);
	} else {
		
		loadVariablesNum("order.php", 0, "POST");
		gotoAndStop(3);
	}
}

the instance name for the listBox is “jumpType” and I would like toget the item selected by the user assign it to a var “jumpType” which would be sent to my php script… please show me what I am doing wrong – I know it is something simple.

Peace

Maybe Kirupa’s listbox tutorial will be of some assistance.

Just click right here to check it out.

ok I’ve changed the code and now it is returning a value in the formatted email, BUT it is returning this:

“[object Object]”

here is the new code I am using:

on (release) {
	var jumpType= jumpType.getSelectedItem();
	if (name eq "" or address eq "" or city eq "" or phone eq "" or rentalDate eq "") {
		gotoAndStop(2);
	} else {
		
		loadVariablesNum("order.php", 0, "POST");
		gotoAndStop(3);
	}
}

got it… I just needed to use this line instead:

var jumpType = jumpType.getValue();

Peace