all groups > flash actionscript > february 2006 >
You're in the

flash actionscript

group:

Sending Listbox.getSelectedItems to php


Sending Listbox.getSelectedItems to php don Carlos
2/14/2006 8:56:29 PM
flash actionscript: I've got a six item multi-select listbox on a form. All elements of the form
send successfully to a php form except the selected items. LiveDocs uses a
separate array to store the items. I then try and produce a string. Nothing I
try results in anything but an undefined. Here's the script in question. It's
a clone from a GoToand Learn tutorial. Unfortunately, that tutorial did not
deal with an array. So, how do I get the array data into the message? I've
done multiple traces in various places and can't get the array to display. If
I try and pull the array itself, I get object. object in the message.

var sendLoad:LoadVars = new LoadVars();
var receiveLoad:LoadVars = new LoadVars();
var areaInquiry_array = new Array();
var areaInquiry_str= new String;

send_btn.onRelease = function() {
areaInquiry_array = areaInquiry.getSelectedItems().label;
areaInquiry_str = areaInquiry_array.join(",");
sendLoad.firstName = firstName.text;
sendLoad.lastName = lastName.text;
sendLoad.theOrganization = theOrganization.text;
sendLoad.theAddress = theAddress.text;
sendLoad.theCity = theCity.text;
sendLoad.theState = theState.text;
sendLoad.theZip = theZip.text;
sendLoad.thePhone = thePhone.text;
sendLoad.theEmail = theEmail.text;
sendLoad.areaInquiry = areaInquiry_str;
sendLoad.sendAndLoad("http://ebogott.com/dyatest.php", receiveLoad);

}

Hay-ulp!

Karl
:confused;
Re: Sending Listbox.getSelectedItems to php don Carlos
2/15/2006 1:00:16 PM
AddThis Social Bookmark Button