Groups | Blog | Home
all groups > flash actionscript > november 2004 >

flash actionscript : select recipient email address from dropdow box/combobox



Candrika
11/8/2004 10:15:30 PM
I have been searching for a tutorial or an editable example of the use of a
dropdown selection box/combobox within a form, whereas the selectable items are
variable of who to send the form email response to.

For example the user will be able to select who his form is sent to by
choosing a recipient name from a drop down box. I am new to actionscripting and
usually just tweak other peoples cool forms, but cant find one that has such an
option. I can send a variable from a drop down box to an output field from the
php file so that the selection is included in the resultant email. But all the
forms i see have the recipient only one choice and I cant get my head around
how to use the dropdown select to change that variable.

If anyone has any code or tips or knows where i could download an example i
could tweak. That would be great.
Thanks
Chandrika dd
derobinson
11/10/2004 4:04:26 AM
To set the variable, you need to put a listener on the combo box, so something
like this (check behind me, I'm typing this off the top of my head on little
sleep):

var myVar:String;
var myListener:Object = new Object();
myListener.change = function(evt){
myVar = evt.target.data;
}
myComboBox.addEventListener("change", myListener)

Hope that helps!
AddThis Social Bookmark Button