Combo Box event listener

Posted on 2008-11-13
Last Modified: 2013-11-11
I have this problem
I have a combobox going to a php form, everything submits correctly but the state never changes it always staying at the first state of the combo box  AL in my php email
with the code of
var type = combo.selectedItem.label;
form = new LoadVars();

I knew that the issue was probably  an event Listener, not seeing the change of the combo box.
so i tried
var cbListener = new Object();
cbListener.change = function(evt) {
    var state =;  
form = new LoadVars();

But now i get
cbListener: [object Object], returned in the php email

Any help would be awesome.
Question by:oldcarguy85
    LVL 39

    Expert Comment

    I'm assuming you mean that if say item2 is selected it must show 2 selected not the default first one?

    i think in your change method you just need to set it

    combo..selectedIndex =;
    trace(;//check this is returning the right thing

    Accepted Solution

    now it gives me undefined.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
    I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
    The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
    The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now