Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

Need java script for dropdown

$
0
0

Hi,

 

I have three text fields  in a form and two drop downs.what ever the value that i enter in to the  three text fileds need to be added to drop down under single region. Thing in my two dropdowns one drop down name if region and another one is state .based on value that is selected in region dropdown states will be populated to state drop down.

 

Now i want to add a new region and new state.

 

Adding a new region i am done with it  by having a textfild and on clicking of button it will add textfiled value to region dropdown.on click event of button i have this script.

 

function addItems(ddl)

{

 

     var dropDownItems = [];

   dropDownItems.push({displayItem: NewRegion.rawValue}); //,value: BoundValue.rawValue}

   for (var i = 0; i < ddl.length; i++)

     {

        dropDownItems.push({displayItem: ddl.getDisplayItem(i)}); //,value: ddl.getSaveItem(i)}

     }

ddl.clearItems();

  for (var i = 0; i < dropDownItems.length; i++)

     {

        var dropDownItem = dropDownItems[i];

        ddl.addItem(dropDownItem.displayItem); //, dropDownItem.value

     }

}

 

But i am not geting how to add  3 state values under the newly added region...

 

Please suggest ..

 

 

Thanks in advance

Bharathi


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>