Combo box/Array Help

I am fixing a bug on an app that someone else developed but
there is a huge bug in it. There is a combo box that is being auto
populated with the school year.
So it looks like this...
2004-2005
2005-2006
2006-2007
2007-2008
The problem is that the default selection is the 2004-2005
school year when it should be 2006-2007
Here is the code:
//Setup Year combo box
var myArray:Array = new Array();
var intCurrentYear:Number = 0;
var myDate:Date = new Date();
for (i=2004; i<=myDate.getFullYear(); i++) {
myArray.addItem({label:i+" - "+(i+1), data:i});
if ((i == myDate.getFullYear()) &&
(myDate.getMonth()>=5)) {
intCurrentYear = i-2004;
trace("current year1:" + intCurrentYear);
trace("i=" + i);
Competencies.cboSchoolYear.dataProvider = myArray;
Competencies.cboSchoolYear.selectedIndex = intCurrentYear;
The variable "i" should equal 2006 and the variable
intCurrent year should equal 2
I didn't write any of this code and i'm going crazy trying to
figure out how to fix it.
Please help!!
Thanks

Look this code.

Similar Messages

  • Prob in retaining spaces in Combo Box, PLEASE HELP ASAP!!

    Hi
    In the application that I am working on, I have developed a screen wherein I populate the names of some schemes from the database, in a combo box (<Select><option></option></Select>).
    A particular scheme in the database has a multiple-word name with double spaces between the two words, or rather between the last of the two words and the brackets.
    e.g. Help CRY (Child Relief & You).
    Now, when this name is fetched fro the database, the double spaces between the CRY and ( are retained but when I display them in the combo box, i.e. between the <option> tags, somehow the double spaces disappear.
    Further on, in my servlet, I retrieve the same scheme name from the combo box and try to fetch some other entries from the database. At that point, since one of the spaces has disappeared, there is no database match found for the scheme name selected and I'm unable to proceed. This problem arises in the case of any number of spaces between the words while populating the combo box. It however works fine when I remove the double spaces and retain a single space between the words.
    Please let me know ASAP if combo boxes eat up such spaces and convert any number of spaces into a single space as a property or is something wrong with the JSP I have here. If this problem can never be resolved as a rule, then please tell me so that I can force the data providers to make sure they filter out such double spaces before sending the data to our databases.
    I'll be very grateful if your can help me out asap as we have to put up the site at the earliest possible date.
    Thanks a lot,
    Soumya

    why not you try to set the option value, like this:
    <option value="Help CRY (Child Relief & You)">words you wan display</option>
    Think if the display is not right it will not affect you from extracting the value.
    Regards,
    Jas

  • Edit combo box array

    Hello,
    I am trying to add a value to a specific combo box in a 2d array.
    lets say i have a 2d array of combo boxes, how can i add a value to the combo box in row 3 and colomn 4?
    Thank.

    Hey,
    I have an ini file with diffrent tests and every test has a diffrent settings, for example:
    [HO type_Intra ASN Handover]
    Type=INI VI
    Delay between H.O=5,2
    Trafic type=Smartbits,Ping
    Number of Handover=xxx
    [HO type_Inter ASN Handover]
    Type=INI VI
    Deleay between H.O=5,2
    Trafic type=Smartbits,Ping
    Number of Handover=xxx
    The idea is that for example delay between handovers is a combo box parameter with values of 5,2 and trafic type is also a combo box parameter but with values smartbit or ping and the number of handovers is a regular string how can i diplay those parameter for the user ? there can be more then 3 parameter...is there a solution ?

  • ABAP Webdynpro cannot display value help, combo box properly in IE ?

    Hi WDA expert,
    I have problem developing webdynpro in NW 7.0 EHP1 SPS02. All the combo box, value help, drop down input did not properly display using IE 7.0 / 8.0. It is something like create another  blank input beside the original object.
    but everything ok if i am using mozilla firefox.
    I am not sure what is the problem with this.
    Please help.
    Thank You and Best Regards
    Fernand.

    Hi Thomas,
    Thank you for your response, But i am still not able to solve the problem. Let me give you more detail information regarding this issue.
    are you using the Portal? The other poster in this thread seems to think so, but I don't see anything in your postings to indicate that. IE7 is supported on your release/SP level. IE8 is not supported until SPS5.
    => I am not using portal it is just normal test from SAP GUI. I am using IE 8.0.6001.18702. So far i have tested the sample webdynpro "WDR_TEST_SELECT_OPTIONS" to 4 different server (PID, PIQ, ECD, ECQ) all using the same version NW 7.0 EHP 1 SPS02. (i have check for ABAP and BASIS package). The problem only occur in PID (Initially the icm service is not start so i use transaction SICF to start the webdynpro service) not sure if there is missing java script library ?
    Please refer in this link for the different result screen capture below:
    http://i802.photobucket.com/albums/yy310/pisuper/WDA_DEV.jpg   --> error in PID
    http://i802.photobucket.com/albums/yy310/pisuper/WDA_QA.jpg    -
    > success in PIQ, ECD, ECQ
    I would recommend clearing your browser cache and the server side cache. For the server side cache go to transaction SMICM and choose Administration->ICM->Exit Hard->Global.
    I have restarted the whole server and i did again from SMICM. But still having the same problem like in the screen capture.
    Are you using a standard or customized theme?
    I am using standard theme base on demo "WDR_TEST_SELECT_OPTIONS"
    Base on my latest investigation seems like those 3 success server PIQ, ECD and ECQ always download this file ls_ie6.nosprite.css in the internet temporary directory, but then no for PID. 
    is that any idea or suggestion that i can try to solve this problem. it seems like some configuration was missing for the standard theme in PID
    Thank You and Best Regards
    Fernand Lesmana
    Edited by: Fernand Lesmana on Jun 16, 2010 3:52 PM

  • Not able to populate data in the combo box

    Hi Guys,
    I m new to flex development and I want to populate the data
    coming from the databasein the combobox.I am able to get the length
    .but not able to populate the data.
    Can anyone helpme out?
    The code is below:
    The data displayed in the combox box is displayed as
    [object],[object] etc.I m sure that the data is coming from the
    database and its not populated in the combo box.any help is
    appreciated.
    private function getParkinfo(event:ResultEvent):void
    { Alert.show(event.result.length.toString());
    countries.dataProvider = event.result;
    <mx:ComboBox id="countries" />

    What does the data look like in the result? Is it XML? Post a
    sample of it.

  • Populating combo boxes

    hi all,
    can any one help me in writing code for populating one combobox depending on selection in another combo box in java or javascript
    like country,state,city in address
    by selecting particular country in country combo box ,states belongs to that country should be populated in state combo box.
    please help me out which driving me mad
    Thank you for ur reply

    Haii arptihaa...
    The correct place to check for user attempts is after else condition of your login validation. Ie is a user login attempt will be checked once the login is failed.
    ie code some what look like this..
    session=request.getSession();
    if(validate user){}
    else
      Integer k=(Integer) session.getAttribute("userAtmpt");
      if(k==null)  //If the user is attempting for the first time
               k=new Integer(0);
            session.setAttribute("userAtmpt",k)
            url="login.jsp"
        else //If this is not first attempt
                  if(k.intValue>=3)  //if the user exceeds the no of attempts
                         url="lock.jsp";
                   else
                          k=new Integer(k.intValue()+1);
                          url="login.jsp"
    }Arpitha, I am not sure abt the syntax but logically it should be correct. Try get the flow and implement, u will get...
    regards
    Shanu

  • Cascaded Combo Box handling?

    I've two combo boxes(cascaded) if i click directly on second combo box it should display error message like "Please Select 1st Combo Box"
    Please Help  me Out
    Thank you
    Raghu
    Message was edited by: Michael Appleby

            //MIR Category DropDown
            var mirCategoryCombo= new sap.ui.commons.ComboBox({
                id:"mirCategoryCombo",
                tooltip:"Select a category",
                value:"",
                width:"100%",
                editable:false,
                change:function(){
                    if(this.getSelectedKey()==""||this.getSelectedKey()==null){
                        this.setValueState(sap.ui.core.ValueState.Error);
                        raiseNotification(5, 20014,  ""  , "", "", "", "I");
                    }else{
                        this.setValueState(sap.ui.core.ValueState.None);
                        // get all product group based on category
                        mirController.getMirProductGroupByCategory("form");
                    mirController.mirEmptyProductControls("mirCategoryCombo");
    var mirProductGroupCombo = new sap.ui.commons.ComboBox({
                id:"mirProductGroupCombo",
                width:"100%",
                editable:false,
                liveChange:function(){
                  if(sap.ui.getCore().byId("mirCategoryCombo").getValue()==""){
                      this.setValueState(sap.ui.core.ValueState.Error);
                  }else{
                      this.setValueState(sap.ui.core.ValueState.None);
                change:function(){
                    if(this.getSelectedKey()=="" || this.getSelectedKey()==null){
                        this.setValueState(sap.ui.core.ValueState.Error);
                        raiseNotification(5,20019,"","","","","I");
                    }else{
                        this.setValueState(sap.ui.core.ValueState.None);
                    mirController.mirEmptyProductControls("mirProductGroupCombo");

  • Looping through an array to get the index for each measure in a combo box

    Hi folks,
    I am working on a web application that has two combo boxes, one for year (called yearcombo) and for measures (called myURL) for that selected year, and also two radiobuttons (in radioBtnGroup). I have two years and a bunch of measure for each year. I  have a map tool tip that when you mouse over the county you see a measure for that specific year. However I have a bunch of measures for each year and I want to be able to loop through the measures (which are in an array collection inside a combobox) so my "if" expression can find every selectedIndex and bring me the tool tip for that selected measure for that selected radio button. Right now I would have to create if statements for each measure (each selectedIndex inside the myURL combobox)and each radiobutton (inside the radioBtnGroup) instead of creating a if expression to get a map tip tool for each measure. I know I would have to create a loop to search for these indexes and enter that in the if expression and also change the graphic.attributes to reflect the right measure or index selected. Do you API for Flex wizards  can give me any tips on how to code this according to my code below ? Any  help is greatly appreciated! (the print scree is attached)
    Below is the code snippet:
    if (yearcombo.selectedItem.year == "2007" && myURL.selectedIndex == 0 && radioBtnGroup.selectedValue == 0)
    fLayer.definitionExpression = "DATA_YEAR_TXT like '2007'"
    var graphic:Graphic = Graphic(event.currentTarget);
    graphic.symbol = mouseOverSymbol;
    var htmlText:String = graphic.attributes.htmlText;
    var textArea:TextArea = new TextArea();
    try{
    textArea.htmlText = myURL.selectedItem.label + graphic.attributes.ForDirIndOut.toString()
    myMap.infoWindow.content=textArea
    myMap.infoWindow.label = graphic.attributes.NAME;
    myMap.infoWindow.closeButtonVisible = false;
    myMap.infoWindow.show(myMap.toMapFromStage(event.stageX, event.stageY));}
    catch(error:Error) {
    trace("Caught Error: "+error);
    And below is the combo boxes with the arrays
    <mx:FormItem label="Year        :"  >
    <mx:ComboBox   id="yearcombo" selectedIndex="0" labelField="label" width="100%" change="changeEvt(event)"  >
    <mx:ArrayCollection id="year"  >
    <fx:Object label="2007"  year="2007" />
    <fx:Object label="2009"  year="2009" />
    </mx:ArrayCollection>
    </mx:ComboBox>
    </mx:FormItem>
    <mx:FormItem label="Measure:">
    <mx:ComboBox   id="myURL" selectedIndex="8" width="80%" mouseOver="clickEv2(event)" close="closeHandler(event)">
    <mx:ArrayCollection id="measures"   >
    <fx:Object id="forindout07" labeltext="2007 Forestry Industry Output" label="Forestry Industry Output " value="RADIO_BUTTONS/TFEI_07_forest_industry_output" year="2007"  />
    <fx:Object id="foremp07" label="2007 Forestry Employment " value="RADIO_BUTTONS/TFEI_07_forest_employment" year="2007" />
    <fx:Object id="forlabinc07" label="2007 Forestry Labor Income " value="RADIO_BUTTONS/TFEI_07_forest_labincome" year="2007" />
    <fx:Object id="forindbustax07" label="2007 Forestry Indirect Business Tax" value="RADIO_BUTTONS/TFEI_07_forest_business_tax" year="2007" />
    <fx:Object id="forindout09" label="Forestry Industry Output " value="RADIO_BUTTONS/TFEI_09_forest_industry_output" year="2009"  />
    <fx:Object id="foremp09" label="2009 Forestry Employment " value="RADIO_BUTTONS/TFEI_09_forest_employment" year="2009" />
    <fx:Object id="forlabinc09" label="2009 Forestry Labor Income " value="RADIO_BUTTONS/TFEI_09_forest_labincome" year="2009" />
    <fx:Object id="forindbustax09" label="2009 Forestry Indirect Business Tax" value="RADIO_BUTTONS/TFEI_09_forest_business_tax" year="2009" />
    <fx:Object id="blank" label=" "  />
    </mx:ArrayCollection>

    And here is the entire code
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application       
                    xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:s="library://ns.adobe.com/flex/spark"
                    xmlns:mx="library://ns.adobe.com/flex/mx"
                    xmlns:esri="http://www.esri.com/2008/ags"
                    paddingBottom="8" paddingLeft="8"
                    paddingRight="8" paddingTop="8"
                    backgroundColor="0xffffff"
                    layout="vertical" >
        <!-- Start Declarations -->
    <fx:Declarations>
            <esri:SimpleFillSymbol id="mouseOverSymbol" alpha="0.5" color="0x808080">
                <esri:SimpleLineSymbol width="0" color="#000000"/>
            </esri:SimpleFillSymbol>
            <esri:SimpleFillSymbol id="defaultsym" alpha="0.01" color="#E0E0E0"   >
                <esri:SimpleLineSymbol width="1" color="#000000"/>
            </esri:SimpleFillSymbol>
        <!-- End Declarations -->
    </fx:Declarations>
        <fx:Script>
            <![CDATA[
                import com.esri.ags.Graphic;
                import com.esri.ags.SpatialReference;
                import com.esri.ags.esri_internal;
                import com.esri.ags.events.GraphicEvent;
                import com.esri.ags.geometry.Extent;
                import com.esri.ags.layers.ArcGISDynamicMapServiceLayer;
                import com.esri.ags.symbols.SimpleFillSymbol;
                import com.esri.ags.symbols.SimpleLineSymbol;
                import flash.utils.flash_proxy;
                import mx.collections.ArrayCollection;
                import mx.controls.Alert;
                import mx.controls.RadioButton;
                import mx.controls.TextArea;
                import mx.events.DropdownEvent;
                import mx.events.ItemClickEvent;
                import mx.rpc.Fault;
                import mx.rpc.events.FaultEvent;
                import flash.display.Sprite;
                import flash.events.ErrorEvent;
                import flash.events.MouseEvent;
                private function closeHandler(evt:DropdownEvent):void {
                    myLabel.text = ComboBox(evt.target).selectedItem.labeltext;
                private function loadLayerName():void
                    myLegend.layers = null;
                    layerPanel.removeAllChildren();
                    //loop through each layer and add as a radiobutton
                    for(var i:uint = 0; i < (dynamicLayer.layerInfos.length); i++)
                        var radioBtn:RadioButton = new RadioButton;
                        radioBtn.groupName = "radioBtnGroup";
                        radioBtn.value = i;
                        radioBtn.label = dynamicLayer.layerInfos[i].name;
                        if (dynamicLayer.layerInfos[i].name == "Direct Impact (Million $)")
                            radioBtn.label = "Direct Impact";
                        else if (dynamicLayer.layerInfos[i].name == "Total Impact (Million $)")
                        {radioBtn.label = "Total Impact";
                        else if (dynamicLayer.layerInfos[i].name == "Total Impact (Jobs)")
                        {radioBtn.label = "Total Impact";
                        else if (dynamicLayer.layerInfos[i].name == "Direct Impact (Jobs)")
                        {radioBtn.label = "Direct Impact";
                        else
                        {radioBtn.visible= false;
                        layerPanel.addChild(radioBtn);
                    /*     myDividerBox.getDividerAt(0).visible = false; */
                    //set the visible layer the first radio button
                     radioBtnGroup.selectedValue = 0;
                     dynamicLayer.visibleLayers = new ArrayCollection([0]);
                    myLegend.layers = [dynamicLayer];
                    myLegend.visible = true;
                private function radioClickHandler(event:ItemClickEvent):void
                    myLegend.layers = null;
                    // update the visible layers to only show the layer selected
                    dynamicLayer.visibleLayers = new ArrayCollection([event.index]);
                    myLegend.layers = [dynamicLayer];
                private function changeEvt(event:Event):void {
                if (yearcombo.selectedItem.year == "2007")
                    measures.filterFunction=filter1
                    measures.refresh()
                    myURL.dataProvider=measures
                else if (yearcombo.selectedItem.year == "2009")
                    measures.filterFunction=filter2
                    measures.refresh();
            public function filter1(item:Object):Boolean
                if (item.year=="2007") return true
                else return false
                public function filter2(item:Object):Boolean
                    if (item.year=="2009") return true
                    else return false
                private function clickEvt(event:Event):void {
                    if (yearcombo.selectedItem.year == "2007")
                        measures.filterFunction=filter3
                        measures.refresh()
                        myURL.dataProvider=measures
                    else if (yearcombo.selectedItem.year == "2009")
                        measures.filterFunction=filter4
                        measures.refresh();
                public function filter3(item:Object):Boolean
                    if (item.year=="2007") return true
                    else return false
                public function filter4(item:Object):Boolean
                    if (item.year=="2009") return true
                    else return false
                private function clickEv2(event:Event):void {
                    if (yearcombo.selectedItem.year == "2007")
                        measures.filterFunction=filter5
                        measures.refresh()
                    else if (yearcombo.selectedItem.year == "2009")
                        measures.filterFunction=filter6
                        measures.refresh();
                    else if (yearcombo.selectedItem.year == 2007 && myURL.selectedIndex==8)
                        myLegend.layers = null;
                        layerPanel.removeAllChildren();
                public function filter5(item:Object):Boolean
                    if (item.year=="2007") return true
                    else return false
                public function filter6(item:Object):Boolean
                    if (item.year=="2009") return true
                    else return false
                /* IF YOU WANT TO INCLUDE OTHER VALUES IN THE MAP TOOLTIP LIKE COUNTY NAME AND THE LABEL OF THE SELECTED ITEM
                if (myURL.selectedIndex==0)
                myTextArea.htmlText = "<b>County: </b>" + gr.attributes.NAME + "\n"
                + "<b>Measure: </b>" + myURL.selectedItem.label + gr.attributes.ForDirIndOut.toString()
                public function fLayer_graphicAddHandler(event:GraphicEvent):void
                    event.graphic.addEventListener(MouseEvent.MOUSE_OVER, onMouseOverHandler);
                    event.graphic.addEventListener(MouseEvent.MOUSE_OUT, onMouseOutHandler);
                public function onMouseOverHandler(event:MouseEvent):void
                    if (yearcombo.selectedItem.year == "2007" && myURL.selectedIndex == 0 && radioBtnGroup.selectedValue == 0)
                        fLayer.definitionExpression = "DATA_YEAR_TXT like '2007'"
                        var graphic:Graphic = Graphic(event.currentTarget);
                        graphic.symbol = mouseOverSymbol;
                        var htmlText:String = graphic.attributes.htmlText;
                        var textArea:TextArea = new TextArea();
                        try{
                        textArea.htmlText = myURL.selectedItem.label + graphic.attributes.ForDirIndOut.toString()
                        myMap.infoWindow.content=textArea
                        myMap.infoWindow.label = graphic.attributes.NAME;
                        myMap.infoWindow.closeButtonVisible = false;
                        myMap.infoWindow.show(myMap.toMapFromStage(event.stageX, event.stageY));}
                        catch(error:Error) {
                            trace("Caught Error: "+error);
                    if (yearcombo.selectedItem.year == "2007" && myURL.selectedIndex == 0 && radioBtnGroup.selectedValue == 1)
                        fLayer.definitionExpression = "DATA_YEAR_TXT like '2007'"
                        var graphic:Graphic = Graphic(event.currentTarget);
                        graphic.symbol = mouseOverSymbol;
                        var htmlText:String = graphic.attributes.htmlText;
                        var textArea:TextArea = new TextArea();
                        try{
                            textArea.htmlText = myURL.selectedItem.label + graphic.attributes.ForTotImpIndOut.toString()
                            myMap.infoWindow.content=textArea
                            myMap.infoWindow.label = graphic.attributes.NAME;
                            myMap.infoWindow.closeButtonVisible = false;
                            myMap.infoWindow.show(myMap.toMapFromStage(event.stageX, event.stageY));}
                        catch(error:Error) {
                            trace("Caught Error: "+error);
                    if (yearcombo.selectedItem.year == "2007" && myURL.selectedIndex == 1 && radioBtnGroup.selectedValue == 0)
                        fLayer.definitionExpression = "DATA_YEAR_TXT like '2007'"
                        var graphic:Graphic = Graphic(event.currentTarget);
                        graphic.symbol = mouseOverSymbol;
                        var htmlText:String = graphic.attributes.htmlText;
                        var textArea:TextArea = new TextArea();
                        try{
                            textArea.htmlText = myURL.selectedItem.label + graphic.attributes.ForDirEmp.toString()
                            myMap.infoWindow.content=textArea
                            myMap.infoWindow.label = graphic.attributes.NAME;
                            myMap.infoWindow.closeButtonVisible = false;
                            myMap.infoWindow.show(myMap.toMapFromStage(event.stageX, event.stageY));}
                        catch(error:Error) {
                            trace("Caught Error: "+error);
                    if (yearcombo.selectedItem.year == "2007" && myURL.selectedIndex == 1 && radioBtnGroup.selectedValue == 1)
                        fLayer.definitionExpression = "DATA_YEAR_TXT like '2007'"
                        var graphic:Graphic = Graphic(event.currentTarget);
                        graphic.symbol = mouseOverSymbol;
                        var htmlText:String = graphic.attributes.htmlText;
                        var textArea:TextArea = new TextArea();
                        try{
                            textArea.htmlText = myURL.selectedItem.label + graphic.attributes.ForTotImpEmp.toString()
                            myMap.infoWindow.content=textArea
                            myMap.infoWindow.label = graphic.attributes.NAME;
                            myMap.infoWindow.closeButtonVisible = false;
                            myMap.infoWindow.show(myMap.toMapFromStage(event.stageX, event.stageY));}
                        catch(error:Error) {
                            trace("Caught Error: "+error);
                    if (yearcombo.selectedItem.year == "2007" && myURL.selectedIndex == 2 && radioBtnGroup.selectedValue == 0)
                        fLayer.definitionExpression = "DATA_YEAR_TXT like '2007'"
                        var graphic:Graphic = Graphic(event.currentTarget);
                        graphic.symbol = mouseOverSymbol;
                        var htmlText:String = graphic.attributes.htmlText;
                        var textArea:TextArea = new TextArea();
                        try{
                            textArea.htmlText = myURL.selectedItem.label + graphic.attributes.ForDirLabInc.toString()
                            myMap.infoWindow.content=textArea
                            myMap.infoWindow.label = graphic.attributes.NAME;
                            myMap.infoWindow.closeButtonVisible = false;
                            myMap.infoWindow.show(myMap.toMapFromStage(event.stageX, event.stageY));}
                        catch(error:Error) {
                            trace("Caught Error: "+error);
                    if (yearcombo.selectedItem.year == "2007" && myURL.selectedIndex == 2 && radioBtnGroup.selectedValue == 1)
                        fLayer.definitionExpression = "DATA_YEAR_TXT like '2007'"
                        var graphic:Graphic = Graphic(event.currentTarget);
                        graphic.symbol = mouseOverSymbol;
                        var htmlText:String = graphic.attributes.htmlText;
                        var textArea:TextArea = new TextArea();
                        try{
                            textArea.htmlText = myURL.selectedItem.label + graphic.attributes.ForTotImpLabInc.toString()
                            myMap.infoWindow.content=textArea
                            myMap.infoWindow.label = graphic.attributes.NAME;
                            myMap.infoWindow.closeButtonVisible = false;
                            myMap.infoWindow.show(myMap.toMapFromStage(event.stageX, event.stageY));}
                        catch(error:Error) {
                            trace("Caught Error: "+error);
                    if (yearcombo.selectedItem.year == "2007" && myURL.selectedIndex == 3 )
                        fLayer.definitionExpression = "DATA_YEAR_TXT like '2007'"
                        var graphic:Graphic = Graphic(event.currentTarget);
                        graphic.symbol = mouseOverSymbol;
                        var htmlText:String = graphic.attributes.htmlText;
                        var textArea:TextArea = new TextArea();
                        try{
                            textArea.htmlText = myURL.selectedItem.label + graphic.attributes.ForIndirBusTax.toString()
                            myMap.infoWindow.content=textArea
                            myMap.infoWindow.label = graphic.attributes.NAME;
                            myMap.infoWindow.closeButtonVisible = false;
                            myMap.infoWindow.show(myMap.toMapFromStage(event.stageX, event.stageY));}
                        catch(error:Error) {
                            trace("Caught Error: "+error);
                    if (yearcombo.selectedItem.year == "2009" && myURL.selectedIndex == 0 && radioBtnGroup.selectedValue == 0)
                        fLayer.definitionExpression = "DATA_YEAR_TXT like '2009'"
                        var graphic:Graphic = Graphic(event.currentTarget);
                        graphic.symbol = mouseOverSymbol;
                        var htmlText:String = graphic.attributes.htmlText;
                        var textArea:TextArea = new TextArea();
                        try{
                            textArea.htmlText = myURL.selectedItem.label + graphic.attributes.ForDirIndOut.toString()
                            myMap.infoWindow.content=textArea
                            myMap.infoWindow.label = graphic.attributes.NAME;
                            myMap.infoWindow.closeButtonVisible = false;
                            myMap.infoWindow.show(myMap.toMapFromStage(event.stageX, event.stageY));}
                        catch(error:Error) {
                            trace("Caught Error: "+error);
                    if (yearcombo.selectedItem.year == "2009" && myURL.selectedIndex == 0 && radioBtnGroup.selectedValue == 1)
                        fLayer.definitionExpression = "DATA_YEAR_TXT like '2009'"
                        var graphic:Graphic = Graphic(event.currentTarget);
                        graphic.symbol = mouseOverSymbol;
                        var htmlText:String = graphic.attributes.htmlText;
                        var textArea:TextArea = new TextArea();
                        try{
                            textArea.htmlText = myURL.selectedItem.label + graphic.attributes.ForTotImpIndOut.toString()
                            myMap.infoWindow.content=textArea
                            myMap.infoWindow.label = graphic.attributes.NAME;
                            myMap.infoWindow.closeButtonVisible = false;
                            myMap.infoWindow.show(myMap.toMapFromStage(event.stageX, event.stageY));}
                        catch(error:Error) {
                            trace("Caught Error: "+error);
                    if (yearcombo.selectedItem.year == "2009" && myURL.selectedIndex == 1 && radioBtnGroup.selectedValue == 0)
                        fLayer.definitionExpression = "DATA_YEAR_TXT like '2009'"
                        var graphic:Graphic = Graphic(event.currentTarget);
                        graphic.symbol = mouseOverSymbol;
                        var htmlText:String = graphic.attributes.htmlText;
                        var textArea:TextArea = new TextArea();
                        try{
                            textArea.htmlText = myURL.selectedItem.label + graphic.attributes.ForDirEmp.toString()
                            myMap.infoWindow.content=textArea
                            myMap.infoWindow.label = graphic.attributes.NAME;
                            myMap.infoWindow.closeButtonVisible = false;
                            myMap.infoWindow.show(myMap.toMapFromStage(event.stageX, event.stageY));}
                        catch(error:Error) {
                            trace("Caught Error: "+error);
                    if (yearcombo.selectedItem.year == "2009" && myURL.selectedIndex == 1 && radioBtnGroup.selectedValue == 1)
                        fLayer.definitionExpression = "DATA_YEAR_TXT like '2009'"
                        var graphic:Graphic = Graphic(event.currentTarget);
                        graphic.symbol = mouseOverSymbol;
                        var htmlText:String = graphic.attributes.htmlText;
                        var textArea:TextArea = new TextArea();
                        try{
                            textArea.htmlText = myURL.selectedItem.label + graphic.attributes.ForTotImpEmp.toString()
                            myMap.infoWindow.content=textArea
                            myMap.infoWindow.label = graphic.attributes.NAME;
                            myMap.infoWindow.closeButtonVisible = false;
                            myMap.infoWindow.show(myMap.toMapFromStage(event.stageX, event.stageY));}
                        catch(error:Error) {
                            trace("Caught Error: "+error);
                    if (yearcombo.selectedItem.year == "2009" && myURL.selectedIndex == 2 && radioBtnGroup.selectedValue == 0)
                        fLayer.definitionExpression = "DATA_YEAR_TXT like '2009'"
                        var graphic:Graphic = Graphic(event.currentTarget);
                        graphic.symbol = mouseOverSymbol;
                        var htmlText:String = graphic.attributes.htmlText;
                        var textArea:TextArea = new TextArea();
                        try{
                            textArea.htmlText = myURL.selectedItem.label + graphic.attributes.ForDirLabInc.toString()
                            myMap.infoWindow.content=textArea
                            myMap.infoWindow.label = graphic.attributes.NAME;
                            myMap.infoWindow.closeButtonVisible = false;
                            myMap.infoWindow.show(myMap.toMapFromStage(event.stageX, event.stageY));}
                        catch(error:Error) {
                            trace("Caught Error: "+error);
                    if (yearcombo.selectedItem.year == "2009" && myURL.selectedIndex == 2 && radioBtnGroup.selectedValue == 1)
                        fLayer.definitionExpression = "DATA_YEAR_TXT like '2009'"
                        var graphic:Graphic = Graphic(event.currentTarget);
                        graphic.symbol = mouseOverSymbol;
                        var htmlText:String = graphic.attributes.htmlText;
                        var textArea:TextArea = new TextArea();
                        try{
                            textArea.htmlText = myURL.selectedItem.label + graphic.attributes.ForTotImpLabInc.toString()
                            myMap.infoWindow.content=textArea
                            myMap.infoWindow.label = graphic.attributes.NAME;
                            myMap.infoWindow.closeButtonVisible = false;
                            myMap.infoWindow.show(myMap.toMapFromStage(event.stageX, event.stageY));}
                        catch(error:Error) {
                            trace("Caught Error: "+error);
                    if (yearcombo.selectedItem.year == "2009" && myURL.selectedIndex == 3 )
                        fLayer.definitionExpression = "DATA_YEAR_TXT like '2009'"
                        var graphic:Graphic = Graphic(event.currentTarget);
                        graphic.symbol = mouseOverSymbol;
                        var htmlText:String = graphic.attributes.htmlText;
                        var textArea:TextArea = new TextArea();
                        try{
                            textArea.htmlText = myURL.selectedItem.label + graphic.attributes.ForIndirBusTax.toString()
                            myMap.infoWindow.content=textArea
                            myMap.infoWindow.label = graphic.attributes.NAME;
                            myMap.infoWindow.closeButtonVisible = false;
                            myMap.infoWindow.show(myMap.toMapFromStage(event.stageX, event.stageY));}
                        catch(error:Error) {
                            trace("Caught Error: "+error);
                public function onMouseOutHandler(event:MouseEvent):void
                    var gr:Graphic = Graphic(event.target);
                    gr.symbol = defaultsym;
                    myMap.infoWindow.hide();
            ]]>
        </fx:Script>
        <fx:Style>
            @namespace esri "http://www.esri.com/2008/ags";
            @namespace s "library://ns.adobe.com/flex/spark";
            @namespace mx "library://ns.adobe.com/flex/mx";
            @namespace esri "http://www.esri.com/2008/ags";
            @namespace components "com.esri.ags.components.*";
            components|InfoWindow
                content-background-alpha : 0.4;
                background-color : #4A7138;
                background-alpha : 0.7;
                border-style : solid;
        </fx:Style>
        <mx:HBox   width="930" height="800"  id="mapHbox"  horizontalAlign="center" >   
        <mx:HBox width="80">
        </mx:HBox>
        <mx:HBox id="myHBox" width="800" height="600" backgroundColor="0xffffff"  >
            <mx:VBox  height="590" width="358"  >
            <!--    <mx:Panel
                    width="356" height="100%"
                    color="0x000000"
                    borderAlpha="0.15"
                    >
                    -->
                    <mx:Canvas height="100%" width="100%" backgroundColor="0xffffff" >
                        <esri:Map id="myMap" openHandCursorVisible="false"
                                  height="100%" 
                                  logoVisible="false"
                                  doubleClickZoomEnabled="false"
                                  scrollWheelZoomEnabled="false"
                                  zoomSliderVisible="false"
                                  scaleBarVisible="false" scale="4000000" >
                            <esri:extent>
                                <esri:Extent xmin="-10736651.061900" ymin="4024099.909700" xmax="-10409195.669800" ymax="3440153.831100"      >
                                    <esri:SpatialReference wkid="102100"/>
                                </esri:Extent>
                            </esri:extent>
                            <esri:ArcGISDynamicMapServiceLayer id="dynamicLayer2"
                                                               url="http://tfs-24279/ArcGIS/rest/services/RADIO_BUTTONS/counties_layer/MapServer" />
                            <esri:ArcGISDynamicMapServiceLayer id="dynamicLayer" name=" "
                                                               alpha="1"
                                                               load="loadLayerName()"
                                                       url="http://tfs-24279/ArcGIS/rest/services/{myURL.selectedItem.value}/MapServer"   />
                            <esri:FeatureLayer id="fLayer"
                                               graphicAdd="fLayer_graphicAddHandler(event)"
                                               mode="snapshot"
                                               outFields="*"
                                               symbol="{defaultsym}"
                                               url= "http://tfs-24279/ArcGIS/rest/services/RADIO_BUTTONS/feature_layer_0709_five/FeatureServer/ 0" />
                        </esri:Map>
                    </mx:Canvas>
            <!--    </mx:Panel>-->
            </mx:VBox>       
            <mx:VBox  height="590" width="20"  >
            </mx:VBox>       
            <mx:Canvas height="500" width="400" backgroundColor="0xffffff"
                       horizontalScrollPolicy="off"
                       verticalScrollPolicy="off" >
                <mx:VBox  width="420" height="50%" paddingLeft="5" paddingTop="10" paddingRight="10" paddingBottom="10"
                         verticalGap="8">
                    <mx:Form  >
                        <mx:FormItem label="Year        :"  >
                            <mx:ComboBox   id="yearcombo" selectedIndex="0" labelField="label" width="100%" change="changeEvt(event)"  >
                                <mx:ArrayCollection id="year"  >
                                    <fx:Object label="2007"  year="2007" />
                                    <fx:Object label="2009"  year="2009" />
                                </mx:ArrayCollection>
                            </mx:ComboBox>
                        </mx:FormItem>
                        <mx:FormItem label="Measure:">
                            <mx:ComboBox   id="myURL" selectedIndex="8" width="80%" mouseOver="clickEv2(event)" close="closeHandler(event)">
                            <mx:ArrayCollection id="measures"   >
                                <fx:Object id="forindout07" labeltext="Forestry Industry Output" label="Forestry Industry Output " value="RADIO_BUTTONS/TFEI_07_forest_industry_output" year="2007"  />
                                <fx:Object id="foremp07" label="Forestry Employment " value="RADIO_BUTTONS/TFEI_07_forest_employment" year="2007" />
                                <fx:Object id="forlabinc07" label="Forestry Labor Income " value="RADIO_BUTTONS/TFEI_07_forest_labincome" year="2007" />
                                <fx:Object id="forindbustax07" label="Forestry Indirect Business Tax" value="RADIO_BUTTONS/TFEI_07_forest_business_tax" year="2007" />
                                <fx:Object id="forindout09" label="Forestry Industry Output " value="RADIO_BUTTONS/TFEI_09_forest_industry_output" year="2009"  />
                                <fx:Object id="foremp09" label="Forestry Employment " value="RADIO_BUTTONS/TFEI_09_forest_employment" year="2009" />
                                <fx:Object id="forlabinc09" label="Forestry Labor Income " value="RADIO_BUTTONS/TFEI_09_forest_labincome" year="2009" />
                                <fx:Object id="forindbustax09" label="Forestry Indirect Business Tax" value="RADIO_BUTTONS/TFEI_09_forest_business_tax" year="2009" />
                                <fx:Object id="blank" label=" "  />
                            </mx:ArrayCollection>
                        </mx:ComboBox>
                        </mx:FormItem>
                    </mx:Form>
                    <mx:VBox  id="layerPanel" width="50%" height="8%" verticalGap="3" paddingLeft="17">
                        <mx:RadioButtonGroup id="radioBtnGroup" itemClick="radioClickHandler(event)"  />
                    </mx:VBox>
                    <mx:VBox paddingLeft="17" height="50%" >
                    <mx:Canvas  id="legendPanel" width="100%"  >
                        <mx:Label id="myLabel" text=" " fontWeight="bold" />
                        <esri:Legend id="myLegend"
                                     layers="{[dynamicLayer]}"
                                     map="{myMap}" visible="false"
                                     respectCurrentMapScale="false"/>
                    </mx:Canvas>
                    <mx:TextArea width="275"  borderAlpha="0" height="200"  >
                        <mx:htmlText   >
                            <![CDATA[<font size='11'><b>Note:</b> Counties in white indicate either no data is available for that measure or the data has been supressed due to confidentiality.</font>
                            ]]>
                        </mx:htmlText>
                    </mx:TextArea>
                    </mx:VBox>   
                </mx:VBox>
            </mx:Canvas>
        </mx:HBox>
        </mx:HBox>   
    </mx:Application>

  • Adobe Acrobat 9: Javascript array populated combo box - Selected answer will not save

    I have a combo box on one of my forms that is populated using a Javascript array.  The combo box is populating just fine, but when an item is selected from that combo box, the selected item does not save when the user saves the document.  Any suggestions as to what the problem is and how it can be corrected?  I am a loss as to where to even begin looking.  Any help is greatly appreciated.
    Thank you.
    Lisa

    You might also want to check the Scripting forum
    http://forums.adobe.com/community/acrobat/acrobat_scripting

  • Connected Combo box problem !   please help me

    Dear Friends....!
    I am developing project in which i have 3 combo :
    1) District Selection
    2) Taluka Selection
    3) Village Selection
    Depend on village selection , perticular persons on that village is displayed on the page.
    This values must be fetched from DATABASE !
    <b> I tried with JAVASCRIPT but with it i can connect two combo and
    can't access database inside javascript. WHAT IS THE SOLUTION EXCEPT AJAX ( That i don't KNOW ) </b>
    may be i can put 3 combo together and on first OnChange event
    i can submit page and process another page and put values in
    another combo and forward page to combo page again.
    i am very much confused HELP ME !
    please i don't know AJAX else problem would be easily solved.
    EVEN I CAN"T MANUALLY PUT DATA IN JAVASCRIPT bcoz my villages
    are more than 400.
    how to put java database code in javascript OnChange event ???
    to fetch data of another combo ?
    HELP WITH EASY SOLUTION.
    Thanks
    GHanshyam
    ================================
    SOLUTION FOR TWO COMBO
    function populate(o) {
      d=document.getElementById('de');
      if(!d){return;}                
      var mitems=new Array();
      mitems['Choose']=[''];
      mitems['Salads']=['Select Item','Tuna Salad','Cesar Salad','Green Salad','Prawn Salad'];
      mitems['Main Courses']=['Select Item','Filet Mignon','Porterhouse','Flank','T-Bone'];
      mitems['Drinks']=['Select Item','Milkshake','Soda','Mixed Drink','Juice'];
      mitems['Desserts']=['Select Item','Ice Cream','Fresh Fruit','Pie'];
      mitems['Snacks']=['Select Item','Brownies','Cookies','Potato Chips'];
      d.options.length=0;
      cur=mitems[o.options[o.selectedIndex].value];
      if(!cur){return;}
      d.options.length=cur.length;
      for(var i=0;i<cur.length;i++) {
        d.options.text=cur[i];
    d.options[i].value=cur[i];
    <!-- Paste this code into the HEAD section of your HTML document.
    You may need to change the path of the file. -->
    <script type="text/javascript" src="dropdownBox.js"></script>
    <!-- Paste this code into the BODY section of your HTML document -->
    <form action="" method="get">
    <label for="or">Our menu:</label>
    <select name="or" id="or" onchange="populate(this)">
    <option value="Choose">Select from the Menu</option>
    <option value="Salads">Salads</option>
    <option value="Main Courses">Main Courses</option>
    <option value="Drinks">Drinks</option>
    <option value="Deserts">Deserts</option>
    <option value="Snacks">Snacks</option>
    </select>
    <label for="de">Select:</label>
    <select name="de" id="de"></select>
    <input type="submit" value="Show me" />
    </form>
    <p><div align="center">
    </div><p>

    may be i can put 3 combo together and on first
    OnChange event
    i can submit page and process another page and put
    values in
    another combo and forward page to combo page again.Almost there. What you should do is submit the page on the onChange event of the combo box; but submit to the same JSP. Then, depending on the values that each of the combo boxes contains, run a query for villages in that District and under that Talluka.
    And populate the third combo box. If any one of the ( first two ) boxes is empty i.e user didnt' select a value, then you'll automatically get no value for the combo boxes from the query.
    Something like this
    <%
        String selectedDistrict = request.getParameter("districtcombobox");
        String selectedTalluka = request.getParameter("tallukacombobox");
        //make sure you don't nulls
        selectedDistrict = selectedDistrict == null?"":selectedDistrict;
        selectedTalluka = selectedTalluka == null?"":selectedTalluka;
        PreparedStatement psFetchTallukas = con.prepareStatement("select tallukaname from tallukas where tallukadistrict = ?");
        PreparedStatement psFetchVillages = con.prepareStatement("select villagename from villages where villagetaluka = ?");
         psFetchTallukas.setString(1, selectedDistrict);
         psFetchVillages.setString(1, selectedTalluka);
       rsTallukas = psFetchTallukas.executeQuery();
       rsVillages = psFetchVillages.executeQuery();
    //now, print out your <option> elements under the corresponding <select> tags for each of the 3 select boxes
    %>For your onChange event you don't need to do anything except call form.submit() where the action should be the same JSP. In case your form is going to be submitted to another page on the final submit i.e after selecting all required values; then in the onChange event handler, before the submit(), you should change the action property of the form to the same page and then submit.

  • Need help @ listening combo box

    Hi Everyone,
    below is my code. Please find my question between '?'ed lines.
    // CREATE COMBO BOX
    if(obj.equals(CSV_COMBO_BOX))
         _combobox[_combobox_count] = new JComboBox();
         //get possible value for combo box
         String [] possible_values = get_possible_values(val[i]);
         for(int i=0; i < possible_values.length; ++i)
         _combobox[_combobox_count].addItem(possible_values[i]);
         //set the default value to usr_val[i]
         _combobox[_combobox_count].setSelectedItem(usr_val[i]);
         // add to panel
         panel.add("tab",_combobox[_combobox_count]);
         // listner
         _combobox[_combobox_count].addItemListener(new ItemListener(){
              public void itemStateChanged(ItemEvent e)
    // ? I WANT TO UPDATE usr_val[i] here ?
    // ? how could i get the value of "i" or
    // combobox_counter in this block?????????
    // ???????????????????????????????<?????
         comboboxcount++;
    Thanks & Regards
    Vikas Talwar

    Hi Everyone,
    below is my code. Please find my question between '?'ed lines.
    // CREATE COMBO BOX
    if(obj.equals(CSV_COMBO_BOX))
         _combobox[_combobox_count] = new JComboBox();
         //get possible value for combo box
         String [] possible_values = get_possible_values(val);
         for(int i=0; i < possible_values.length; ++i)
         _combobox[_combobox_count].addItem(possible_values);
         //set the default value to usr_val
         _combobox[_combobox_count].setSelectedItem(usr_val);
         // add to panel
         panel.add("tab",_combobox[_combobox_count]);
         // listner
         _combobox[_combobox_count].addItemListener(new ItemListener(){
                public void itemStateChanged(ItemEvent e)
              // ? I WANT TO UPDATE usr_val here ?
              // ? how could i get the value of "i" or
              // _combo_box_counter in this block?????????
              // ???????????????????????????????<?????
    _combobox_count++;
    }I have two arrays: one called "val" which is an array of string arrays that you use to populate a JComboBox, and the other one is called "usr_val" that holds strings and is used to set the JComboBox default values. You want to change the default value when the selected item in the corresponding JComboBox has changed. To manage your arrays and JComboBoxes, you have
    one counter "i" which seems to count the arrays of string arrays and the array with the default strings and one counter "_combobox_count" which counts the JComboBoxes that have been genererated with the help of these arrays. Obviously, the arrays could be used to generate a different JComponent as well, in which case "i" and "_combobox_count" will have different values. Both "i" and "_combobox_count" are clearly available within the if-block, so you don�t need any extra tricks to access them. What happens if you directly access "i" or "_combobox_count" from within the "itemStateChanged"-method?
    Thanks & Regards
    Vikas Talwar

  • Help with combo boxes

    I am currently building a site with flash / dreamweaver and
    am attempting to add two or three combo boxe that will display data
    and pictures from a database. Any ideas or assistance would be much
    appreciated...
    Many thanks in advance

    Sunil,
    I'm attempting to use the data binding technique but I'm perhaps not understanding exactly where this should go.  For now I'm fine with having a static array that just lives locally on the page.   Each of my combo boxes are being populated using the
         mx:Array --> mx:Object logic. 
    I need to fire off an event to a function that is able to determine which selection(s) from the combination of the two combo boxes were chooses.  I'm accomplishing that by using selectedIndex property of the combo boxes id.  I then have 'n' number of unique Array Collections that are basically a three dimensional array containing the numeric percentage that I need to display graphically.  I need my function to be able to choose the appropriate Collection based on the combination of selected index(es) and then update my column chart accordingly. 
    My other confusion is how to do use my data binding at the chart level.  So my page is really nothing more than two combo boxes and chart that I need to change dynamically as the selections in the combo boxes changes.  Eventually I will use a webservice to connect to a .jsp page that is using DAO to retrieve the values from the database but right now I'm fine with fetching them locally just so I'll know I'm on the right track. 
    If it would help I can include the snippet of the code that I'm working on.
    Thanks for your help
    -->Nash

  • Please help with: A date split into 3 Combo Boxes ....

    Can someone help me with this Please?
    I have a date for a Date of Birth i.e. dd/MM/yyyy
    I need to split it up an place it into 3 combo boxes i.e. Day Combo, Month Combo and Year Combo.
    This is the code I have to set the combo boxes, now I need to bring it back into the combo boxes.
    can someone help me with the code as I need to have this finish on friday and I am running out of time. I just dont know what to do PLEASE SOMEONE HELP...
    Thanks
    Craig
    // List days
      private void DayOfTheMonth(int highNumber,JComboBox comboBox){
        comboBox.addItem(" ");
        for (int index = 1; index < highNumber; index++) {
          comboBox.addItem(String.valueOf(index));
      private void DaySpecificComboBox()
        DayOfTheMonth( 32, DayjComboBox);
    // List Months
      private void Month(){
        MonthjComboBox.addItem("");
        MonthjComboBox.addItem("January");
        MonthjComboBox.addItem("February");
        MonthjComboBox.addItem("March");
        MonthjComboBox.addItem("April");
        MonthjComboBox.addItem("May");
        MonthjComboBox.addItem("June");
        MonthjComboBox.addItem("July");
        MonthjComboBox.addItem("August");
        MonthjComboBox.addItem("September");
        MonthjComboBox.addItem("October");
        MonthjComboBox.addItem("November");
        MonthjComboBox.addItem("December");
    //List Years
      private void Year(int highNumber,JComboBox comboBox){
        comboBox.addItem(" ");
        for (int index = 2002; index > highNumber; index--) {
          comboBox.addItem(String.valueOf(index));
      private void YearSpecificComboBox()
        Year( 1900, YearjComboBox);
    private String StringFromDateFields(){
        int month =1;
        if (MonthjComboBox.getSelectedItem().equals(JANUARY))
          month = 1;
        else
          if (MonthjComboBox.getSelectedItem().equals(FEBRUARY))
            month = 2;
          else
            if (MonthjComboBox.getSelectedItem().equals(MARCH))
              month = 3;
            else
              if (MonthjComboBox.getSelectedItem().equals(APRIL))
                month = 4;
              else
                if (MonthjComboBox.getSelectedItem().equals(MAY))
                  month = 5;
                else
                  if (MonthjComboBox.getSelectedItem().equals(JUNE))
                    month = 6;
                  else
                    if (MonthjComboBox.getSelectedItem().equals(JULY))
                      month = 7;
                    else
                      if (MonthjComboBox.getSelectedItem().equals(AUGUST))
                        month = 8;
                      else
                        if (MonthjComboBox.getSelectedItem().equals(SEPTEMBER))
                          month = 9;
                        else
                          if (MonthjComboBox.getSelectedItem().equals(OCTOBER))
                            month = 10;
                          else
                            if (MonthjComboBox.getSelectedItem().equals(NOVEMBER))
                              month = 11;
                            else
                              if (MonthjComboBox.getSelectedItem().equals(DECEMBER))
                                month = 12;
                              String
                              DOB = DayjComboBox.getSelectedItem()+"/"+String.valueOf(month)+"/"+YearjComboBox.getSelectedItem();
                              return DOB;

    Thanks for your time.
    I could not get that to work ??
    I have come up with this code whitch seams to work. Thought you may like to see it
         String dobxml = xmlDoc.getValueOf(clientInfo, "DOB");
          String dob = dobxml.replace('/', ' ');
          System.out.println(dob);
          StringTokenizer tokenizer = new StringTokenizer(dob);
          String day = tokenizer.nextToken();
          String month = tokenizer.nextToken();
          String year = tokenizer.nextToken();
          System.out.println(dob);
          DayjComboBox.setSelectedItem(day);
          MonthjComboBox.setSelectedIndex(Integer.parseInt(month));
          YearjComboBox.setSelectedItem(year);ps thankyou
    Craig

  • Need Help, retrieving a combo boxes actual/print/visible value instead of the export value.

    Hello,
    I need help, retrieving a combo boxes actual value, not the export value.
    I have a combo box with multiple options to select from.
    each of those selections has a separate export value, which is in the form of a number, which I use to calculate dates in a separate field.
    However, I have another field that i want to retrieve the, users selected value, which is text, from the combo box instead of the export value.
    Is there an easy way to do this.
    This is what I am currently using. But like I said the results are that I retrieve the export value and not the selected text value.
    event.value = this.getField("_Arugula").valueAsString;
    Thanks

    First get the currentValueIndices property of the combo box and use it with the getItemAt field method to return (what I call) the display value. Something like:
    var f = getField("combo1");
    var display_value = f.getItemAt(f.currentValueIndices, false);
    See the documentation for more information

  • Combo box ( i can't solved. help me)

    hi, i have doubt in combo box
    <select name="branch">
    <option>chennai</option>
    <option>bangalore</option>
    <option>delhi</option>
    <option>mumbai</option>
    </select>
    In the above code i didn't use <option value> but i give the values between the <option>xxxx</option>tags.
    Now i want to retreive the values between the <option></option> tags.
    is it possible?.if yes how?. please send me code. it would be very helpful to me.

    linta mam..try this..
    I hope u know how to write js functions..
    write a function for onChange event of ur select ..
    inside the function u can give
    var index=document.getElementById("branch").selectedIndex;
    alert(document.getElementById("branch").options[index].text)

Maybe you are looking for

  • General gd-80 stuff plus I got my raid 0 working!

    I had put in a new thread a cpl days ago reguarding not bn able to get the control-f to display so I could get to the raid rom bios. Well, I finally got to it, but I guess I just pushed the control-f at the right moment because I still couldn't see i

  • E52 Speakerphone volume too low

    Hello, When using speakerphone on E52 sound volume is too low. Even if I keep it on max, it's still too low. Considering that ringtones can be played with a lot stronger volume using the same speaker (as speakerphone does) -  I assume there must be a

  • Printing photos with Color Laserjet CM1312. Need proper printing software.

    I'm trying to print photos from my Color Laserjet CM1312 multi-function printer. I used to have a Photosmart inkjet, and tried to use the photo-printing softthat came with that printer, as I really like it. But that must have been designed just for i

  • Removing Cycles from Graphs

    Hello, is anyone familiar with the problem of removing cycles from a directed graph G? I would like to form a DAG G' where all possible paths that are present in G are still present in G', except that these paths don't have to be infinite (the cycles

  • Two facts with conformed dimension

    Starting new thread per Alistair's request :) I have two facts Class Enrollment (who is enrolled in which classes) External Test Scores (who got what score on what exam) The only dimension they have in common is "Person". Is it possible to build a pr