You need to give unique ids to the comboboxes.  <mx:Combobox id=”cb1”… />  <mx:Combobox id=”cb2” … />…you really should do it for all components you have in your mxml file that you’ll be updating or changing dynamically…

 

Robert L. Brueckmann

Senior Web Developer

Merlin Securities, LLC

595 Madison Avenue

New York, NY 10022

p: 212.822.4821
f: 212.822.4820


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, March 28, 2005 1:46 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Can someone help me figure out this code

 

What I am trying to do is make two combo boxes one if you make a selection it puts some text in a tex box based on the selection, then have another one right under that that does the same thing. The problem is the computer gets confused when it sees two combo boxes so can someone explain this to me please

 

<?xml version="1.0" encoding="utf-8"?>

 

<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml">

 

    <mx:Script>

 

      public  var lettersone = [ {label:"A", Number:0}, {label:"B", Number:1}, {label:"C", Number:2}, {label:"D", Number:3}, {label:"E", Number:4}, {label:"F", Number:5}, {label:"G", Number:6}, {label:"H", Number:7}, {label:"I", Number:8}, {label:"J", Number:9}];

 

        public var selectedItem:Object;
  
  
  public  var letterstwo = [ {label:"A", Number:0}, {label:"B", Number:1}, {label:"C", Number:2}, {label:"D", Number:3}, {label:"E", Number:4}, {label:"F", Number:5}, {label:"G", Number:6}, {label:"H", Number:7}, {label:"I", Number:8}, {label:"J", Number:9}];

 


 public var selectedletter:Object;

 

    </mx:Script>

 

    <mx:HBox horizontalGap="30">

 

        <mx:ComboBox dataProvider="{lettersone}" width="150" change="selectedItem=event.target.selectedItem"/>
        <mx:ComboBox dataProvider="{letterstwo}" width="150" change="selectedItem=event.target.selectedletter"/>
        <mx:VBox width="200">
            <mx:Label text="{selectedItem.label}"/>
            <mx:Label text="{selectedItem.Number}"/>
   <mx:Label text="{selectedletter.label}"/>
            <mx:Label text="{selectedletter.Number}"/>
        </mx:VBox>

 

    </mx:HBox>

 

</mx:Application>

 

 

 

 

 


 



 

This message contains information from Merlin Securities, LLC, or from one of its affiliates, that may be confidential and privileged. If you are not an intended recipient, please refrain from any disclosure, copying, distribution or use of this information and note that such actions are prohibited. If you have received this transmission in error, please notify the sender immediately by telephone or by replying to this transmission.
 
Merlin Securities, LLC is a registered broker-dealer. Services offered through Merlin Securities, LLC are not insured by the FDIC or any other Federal Government Agency, are not deposits of or guaranteed by Merlin Securities, LLC and may lose value. Nothing in this communication shall constitute a solicitation or recommendation to buy or sell a particular security.

Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to