How do I populate one dropdown list based on the selection in another dropdown list?

I have one dropdown list that has 21 choices.  Depending on the selection of those 21 choices, I have another dropdown list that will select a different subset of choices from a pool of 96 choices.  How do I get this to happen?

I have one dropdown list that has 21 choices.  Depending on the selection of those 21 choices, I have another dropdown list that will select a different subset of choices from a pool of 96 choices.  How do I get this to happen?

Similar Messages

  • How to populate a dropdown box based on a selection in another Dropdown box.

    I am trying to find out a way to do the following:
    I am using coldfusion ....working on a form. The form has
    couple of dropdown boxes. Based on the selection on the first
    dropdown box another dropdown box needs to get populated with
    different options. These options will be coming from a query. I am
    trying to find out the Javascript code for doing this.
    Thanks in advance.

    jchopra,
    There's a method to doing what you're wanting to do that I've
    used extensively.
    Basically, within my code, I start by invoking the method
    that returns the data for the dropdown lists. Then, I use the
    following code to pour the data returned into a javascript array:
    var locArray = new Array(#evaluate(locs.recordcount+1)#);
    locArray[0] = new Array('','','','','','','','','',);
    <cfloop query="locs">
    locArray[#locs.CurrentRow#] = new
    Array('#JSStringFormat(locationId)#',
    '#JSStringFormat(fkyPolicyId)#',
    '#JSStringFormat(locationNumber)#',
    '#JSStringFormat(description)#',
    '#JSStringFormat(address1)#',
    '#JSStringFormat(address2)#',
    '#JSStringFormat(zipcode)#',
    '#JSStringFormat(city)#',
    '#JSStringFormat(state)#';
    </cfloop>
    Then I wrote a javascript function that is assigned to the
    first dropdown's onChange() event. When the user changes the value
    that is selected within the dropdown, I use javascript to locate
    (using the policyid) the corresponding record in the javascript
    array and populate and/or select the appropriate value(s) in the
    second dropdown.
    If the data returned from the method invocation is too large
    to use within a javascript array, you may need to limit the results
    that are returned.
    Hope this makes sense. If not, please let me know.
    ds

  • Create a filtered list based on the selection in another field? URGENT HELP NEEDED

    Hi,
    Hoping someone can help me with something I am working on. i am fairly new to creating forms in acrobat (know how to us the full range of very basic features) but I have now found myself needing some help.
    i am producing an order form, and I need to create a filtered dropdown list based on the value selected in another field.
    basically, when a user select the company chooses their Business Name from a dropdown list, I would like their deliver address to self populate. In some cases there may be a few options for the company delivery address so in these cases the second option would be a dropdown list of the options available for that company.
    i have attached a screenshot, it is the Fields "Business Name" and "delivery Address/Delivery Postcode" that i would like to be linked so that the option in Business Name filtered the options in delivery Address
    Hope someone out there has the time to help me with this, i am using Acrobat Pro DC
    many Thanks
    Lee

    This will require a complex, custom-made script. The basic functionality of populating another field based on a selection in a drop-down is not that complicated, but if you want it to also populate other drop-downs (and then presumably use them to populate other fields), it will require a more complex solutions.
    This tutorial is relevant for your question: https://acrobatusers.com/tutorials/change_another_field

  • Pre-Populate Dropdown based on information selected in another dropdown

    Hello,
    I hope this make since. I am working on building a form using Adobe Livecycle Designer. I have a dropdown list in multiple fields on the same form that will have the same information selected. I want the additional fields to automatically populate the information a user selects in the first dropdown list. Is this possible ??? If so, what would be the script/code necessary to do so ??? Thank you for your help.
    Example
    City, State appears in 4 different fields based on the selection in field 1, the additional 3 fields auto-populates the same information.
    Field/List 1: New York, NY <-- Selected City, State
    Field/List 2: New York, NY <-- Auto Populated based on field 1
    Field/List 3: New York, NY <-- Auto Populated based on field 1
    Field/List 4: New York, NY <-- Auto Populated based on field 1

    In the exit event of the first State field, using Javascript, something like this should work:
    State2.rawValue = this.rawValue;
    State3.rawValue = this.rawValue;
    State4.rawValue = this.rawValue;
    ...where "State2", "State3", etc. are references to the other dropdowns you want to populate with the same information from the first state field.
    Be sure to set the binding values in the BINDING tab of the dropdowns to the same in each dropdown,
    Brian

  • Create a drop down list that populates based on the selection form another drop down list.

    I need to set up a drop down list that is popualated (i.e. displays a certain list of selctions in the drop down list) based on the choise the form user selects in an adjacent List
    For example
    There are two drop down list field sitting side by side in the form
    1. Select State          2. Select Course
    What I want to do is have a list of states in the first drop down list (1.Select State) and depending on which state the form user selects , the second drop down list (2.Select Course) will populate with a selction of courses available in that selected state only (i.e. it will on;y show course available in QLD if QLD is selcted).
    Is this hard to do?

    Hi,
    I would recommend some posts from Stefan Cameron's blog:
    http://forms.stefcameron.com/2006/09/18/connecting-a-form-to-a-database/
    http://forms.stefcameron.com/2006/09/29/selecting-specific-database-records/
    http://forms.stefcameron.com/2006/12/18/databases-inserting-updating-and-deleting-records/
    http://forms.stefcameron.com/2006/12/07/better-form-design-with-xfa-25/
    Hope that helps,
    Niall

  • How do I populate one Combo box based on input from another

    Hi,
    I have a dynamic Combo box populated from a database. Now I want to use the onChanged event to dynamically populate a second combo box on the same page.
    Any ideas on how to do this?
    Robert
    [email protected]

    Here is an example:
    let us consider it not coming from the database:
    <html>
    <head>
    <title>New Page 1</title>
    <script>
    function popSub()
    var n = 1;
    var mainValue;
    mainValue = document.test.main.options[document.test.main.selectedIndex].value ;
    if (mainValue=="Age" )
                        document.test.sub.options[n].value = 'below18';
                        document.test.sub.options[n].text = 'Below 18';
                        n =     n + 1;
    if (mainValue=="Age" )
                        document.test.sub.options[n].value = 'over18';
                        document.test.sub.options[n].text = 'Over 18';
                        n =     n + 1;
    if (mainValue=="Sex" )
                        document.test.sub.options[n].value = 'male';
                        document.test.sub.options[n].text = 'Male';
                        n =     n + 1;
    if (mainValue=="Sex" )
                        document.test.sub.options[n].value = 'female';
                        document.test.sub.options[n].text = 'Female';
                        n =     n + 1;
    </script>
    </head>
    <body>
    <form method="POST" name="test">
    <p><select size="1" name="main" onClick="popSub()">
    <option value="Age">Age</option>
    <option value="Sex">Sex</option>
    <option selected>select one</option>
    </select></p>
    <p><select size="1" name="sub">
    <option value=""></option>
    <option value=""></option>
    <option value=""></option>
    </select></p>
    <p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
    </form>
    </body>
    </html>
    If it coming from the database then you have to write the javascript function in jsp as follows:
    out.println('<script language="JavaScript">');
    out.println('function popSub()');
    out.println('{');
    out.println('var n = 1;');
    out.println('var mainValue;');
    out.println('mainValue = document.test.main.options[document.test.main.selectedIndex].value ;');
    // start one for loop from 1 to record count
    out.println('if (mainValue=="' + valuefrom the resultset + '")');
    out.println('{');
    out.println("document.test.sub.options[n].value = '" + value from the result set +"';");
    out.println("document.test.sub.options[n].text = '"+value from the result set+"';");
    out.println('n=n+1;');
    out.println('}');
    // end of the for loop
    finish the javascript function using out.println

  • Dynamic dropdown based on user selection of another dropdown on the same page

    hi all, ok, I have a table which contains use data, a name,
    and a userID. for the example lets say "Simon Bullen" and my userID
    is "999".
    on a form I have, there is a dropdown box, which is dynamic
    from this table, and allows me to select Simon Bullen, however, I
    have a hidden field on the form, which when the user selects "simon
    bullen" the hidden field populates with the appropiate U number
    from the same table.... no i thought this would do it:
    <cfquery name="userNumber" datasource="userList">
    SELECT userNumber FROM dbo.Users WHERE Name =
    <cfqueryparam value="#form.Name#">
    </cfquery>
    and then my dynamic form field (hidden) would reference to
    this query....
    but it doens't work, could somebody please enlighten me? I'm
    hoping its something silly
    Thanks in advance

    You could make the value of the option the UserID and the
    option display the name.
    If that isn't what you need, I think you'll need some
    javascript to populate your hidden field based on what is chosen in
    the select.
    I think you can modify this:
    http://www.javascriptkit.com/javatutors/selectcontent2.shtml
    ...to populate your hidden field instead of a new select
    list.
    If there's a way to do that without JS I'm not aware of it.
    A third possibility: look up the UserID (based on the name
    chosen) after the form is submitted then do with it whatever you
    need to.

  • Fill a combo box based on the selection of another combo box

    Hi All,
    I am new to jsp & java script. I have a arraylist of communities and there are 2 combo boxes meant for source community & destination community.
    First user will select Source community , after that I've to remove that community from list and display the option for destination community combo box.
    Here the problem is I am getting the source community value in a java script function - "checkSource() " which I've written at the "onClick" of source community.
    Now java script variable has that community & list of community is a java variable, so I am not able to remove that community from java list.
    Please suggest in the same.
    I've written like this -
    function checkSource()
         var selIndex = document.targetForm.srcgroupname.selectedIndex;
    var srcCommunity = document.targetForm.srcgroupname.options[selIndex].value;
    alert("Selected Src Community-"+srcCommunity);
         <%
         alert("Community length-"+community.size());
         community.remove(community.getIndex( %> srcCommunity <%));
         alert(community.size());
         %>
    But this is not working. community is a java list.
    Please help....
    Thanks in Advance
    Sneha

    Do it with AJAX. Here -> http://www.iem.pw.edu.pl/~opalam/sample/TestAJAX.zip You can download a small, sample project that presents AJAX.
    In the project Servlet, Gson and Jquery is used. When onchange is fired in the first select box a js script method is invoked. This method uses ajax to get the json (gson is used to transfer java objects to json) data from the servlet depending on the value of selected option. When data are obtained the second select box is populated. Of course it might be written better but the general idea is clearly visible which was my goal. Hope this helps.

  • Is there a way to fill a cell with a value based on the selection from another cell?

    For example: If have a drop down menu created for Cell A1 with options (Dog 1, Cat 2, Bird 3). Is there a way to fill cell A2 automatically when I select from the drop down menu.
    So if I selected 'Cat' in A1, cell A2 would automatically input the 2.

    I suggest an extensible method that allows you to add other animals:
    This method adds a small table called "Animal Lookup" that matches names (same as in the pop-up menu) with a value.
    The table on the left uses this table to retrieve the value based on the animal:
    B2=VLOOKUP(A2, Animal Lookup :: A:B, 2, 0)
    select B2 and fill down

  • Populating 2nd drop down list based on the selection of the first using Access DB...

    I have a form that I would like to have the user select the first drop-down list as populated from a data source, but them have the subsequent selection choice dependent on the first. For instance, if they select "administration" for their division, the department numbers shown in the second box would only contain those with "Administration" listed as their division. I have all of this information in my Access table.
    I've seen this possible by storing all of the information in a script. i.e.- listing each division and department. The only problem is that we have over 300 departments and making any changes would be very tedious in an in-form script. Is there any way to have this automatically reference a table in Access?
    Thank you,
    Mike

    In the current version of the portal, it is not possible as you cannot do code-behind on postbacks. If you want more flexibility, you need to write your own front-end that uses the FIM Service webservices...
    Regards, Soren Granfeldt
    blog is at http://blog.goverco.com | facebook https://www.facebook.com/TheIdentityManagementExplorer | twitter at https://twitter.com/#!/MrGranfeldt

  • Dynamically change the contents of one combo box based on the other

    Hi Forum,
    I have a question which might have a possibly simple answer. Well anyway help me out since i could not find the simple answer.
    I am building an application using Swing and binding with BC4J using JClient. My GUI has combo boxes, grids, editboxes. My requirement is that i should be able to dynamically change the contents of one combo box based on the selected item in trhe previous combo box. For example, when i choose a country in the "country combo box", the "states combo box" should show the list of the states of the selected country.
    Now how do i do this using binding. If not, how do i write custom querirs in BC4J layer and return a resultset to the remote application so theat i can populate the dependent combo boxes.
    I will appreciate if anyone can help me out in this regard.
    Thank You
    Sumit

    there could be quite a few number of ways of solving this problem.
    One way is through event handlers.
    taking your example as a model when user selects a country you could fire an action with a flag set to ture. A method will return the states from the DB or your temporary files or what ever and then the true flag will be used in the states combo box rendering.
    other way: javascript
    this might be a bit clumsy as you will need the states information in a property file and you can get the info as the user selects a country.
    regards,
    raj

  • While selecting value from combo box in one frame, based on the selection..

    Hi friends,
    can someone help me out on a issue as it follows:-
    iam developing an application where Iam using xsl,html,javascript and xml.
    There is no existense of Database at all. data is read from xml.
    now,
    In a window there are 3 frames. In the 1st frame combo box is there.
    Based on the selection in the combo box data will be displayed in the 2nd frame.
    now onchange or onselect methods not giving the expected result.
    actually,in the the xsl which is having 3 frames,the 1st and 3rd frame
    calling src="abc.xml" and src="abc.xml"which are static.
    but in the 2nd frame the data need to be changed dynamically.
    I have given frame name="frame_ExchangeDetails2" rows="3%" src="cc_marketWatch_02.xml"/>
    usually data dynamically comes from database.but here i have to refer xml file
    something like [window.href.location="abc.xml"]
    but the problem is when you refer supose:-
    <frame name="frame_ExchangeDetails2" rows="3%" src="cc_marketWatch_02.xml"/>
    the frame is having static page,though there are functions in javascript which are called in onload and onchange.which are not working.
    I have tried putting if condition like:-
    if(document.abc.fieldname.value=='6'
    {   window.location.href = "cc_custLookUpData-mobileno.xml";   
    so that it could go to the repective page.
    but it is not working.
    so what should i do if I select from combo box in one frame and based on the selection xml/html page will be displayed in the 2nd frame.
    if anybody has google account i can forward the zip file so it will be easier to understand.
    Regards
    Message was edited by:
    Postqueries
    Message was edited by:
    Postqueries

    If you have rights to modify tabular model then, you can create a measure in your Tabular model which returns previous week and then use this measure in Pivot Table.
    Thanks,
    Sagar K 
    (Blog: http://datamazik.blogspot.in/)

  • How to show regions markers in Google maps based on longitude and latitude. on-click of region marker i want to display all the country locations based on the region from share point list?

    Hello every one,
    In My requirement i am having  some regions with longitude and latitude in one SharePoint list. in another SharePoint list i am having the country values with longitude and latitude and region as look up field.  I want to display all the region
    markers in Google maps. on click of any region marker i want to zoom in the map to region level and i need to display all the country markers in Google maps under the region. can any body help me on this requirement.
    Thanks in advance,
    Venu.

    Not sure about Google Maps but this is fairly easy to do with Bing Maps. I've used Bing Maps with SharePoint lists fairly regularly. Here are some blog posts:
    http://blogs.bing.com/maps/2013/03/26/connecting-a-sharepoint-list-to-bing-maps/
    http://blogs.bing.com/maps/2013/03/07/geocoding-a-sharepoint-list-item/
    Once you have your sharepoint list connected to Bing Maps you can easily filter the list data based on the selected country if you have a country column in your list. If you want to take things a bit further an create a much cooler user experience you can
    also use the Bing Maps GeoData API to get the country boundaries and show them on the map as polygons. These could be color coded based on some metric, or set up as the clickable area on the map rather than a pushpin. Here is a blog post on how to use the
    GeoData API with the JavaScript Bing Maps control:
    http://blogs.bing.com/maps/2013/06/25/retrieving-boundaries-from-the-bing-spatial-data-services-preview/
    http://rbrundritt.wordpress.com

  • Populate a dropdown based on selected in another dropdown in a seperate table

    Good Day All;
    This may sound like a simple question to most, but… It has had me frustrated trying to figure out.
    I am trying to populate a dropdown based on what is selected in another dropdown.
    Let me explain what I have done so far.
    LifeCycle Designer 8.05.2
    When I had both dropdowns in the same table, I did not have a problem. The code I used is
    Table name is “Table1”
    if(directorate.rawValue == "1")
    division.clearItems();
    division.addItem("select")
    I was asked to move things around and now “division” is located in “Table2”
    I know I need to reference “Table1” but I am running into a Syntax error. I have tried the following code;
    if(Table1 Row1 directorate.rawValue == "1")
    division.clearItems();
    division.addItem("Faire un choix")
    if(Table1.Row1.directorate.rawValue == "1")
    division.clearItems();
    division.addItem("Faire un choix")
    Any help would be appreciated
    Chomp

    You're missing a semicolon at the end of the addItem line, and on the second code sample you've got no periods in the SOM reference (Table1 Row1 directorate). 
    The easiest way to get the path to another field is to ctrl-click on the field while you are in the script editor.

  • Populate 2nd combo box based on value selected in 1st combo box

    I am still using Acrobat 6 though I may be upgrading soon to Acrobat 8. I have a form with two combo boxes, the first "state" has values of MN and WI. Based on which value the user picks I would like to populate a "county" combo box with lists of counties that we deal with.
    Thanks,
    Gene

    One can set the option and export value using an arry:<br /><br />// document level script<br />// Master List of Lists <br />// Each entry in this object listeral is the name of a State <br />//Manually enter the State Names into the state field combo box <br />// The associated value is the item list, where each item is a name value pair, [<County> and [county code, zip code]] <br /><br />// state: ["county name", ["county code", "zip code"]]<br />var oStateNames = {MN: [["-", ["", ""] ], <br />                       ["St. Louis", ["MNStl", "55001"] ], <br />                       ["Carlton", ["MNSCrl", "55002"] ], <br />                       ["Pine", ["MNPin", "55003"] ],<br />                       ["Cook", ["MNCok", "55004"] ] <br />                       ], <br />                   WI: [["-", [" ", " "] ],<br />                        ["Douglas", ["WIDou", "55005"] ] ,<br />                        ["Bayfield", ["WIBay", "55006"] ],<br />                        ["Burnette", ["WIBur", "55007"] ],<br />                        ["Ashland", ["WIAsh", "55008"] ]<br />                       ]<br />                     }; <br /><br />//SetCountyEntries() on keystroke entry in state field <br />function SetCountyEntries() <br />{ <br />   if(event.willCommit) <br />   { <br />      // Get the new counties list from the Master List <br />      // Since the selection is being committed, <br />      // event.value contains the State name <br />      var lst = oStateNames[event.value]; <br />      // Clear the county list if there are no counties for the selected state <br />      this.getField("ee.address.county").clearItems();<br />      this.resetForm(["ee.address.code", "ee.address.zip"]);<br />      if( (lst != null) && (lst.length > 0) )<br />           this.getField("ee.address.county").setItems(lst); // set opiton and export value<br />   } <br />} <br />//  end document level script<br /><br />For the combo box "ee.address.county" one can create an array from the export value to populate the county code and zip code<br /><br />// custom keystroke for county combo box<br />if(event.willCommit & event.value != "") {<br />// split county and zip codes<br />var aCodes = this.getField(event.target.name).value.split(",");<br />this.getField("ee.address.code").value = aCodes[0];<br />this.getField("ee.address.zip").value = aCodes[1];<br />}<br />// end custom key stroke code

Maybe you are looking for

  • IPhone 5 Battery Indicator and Reboot issues

    Hello Apple community forum, I have an iPhone 5 that I purchased approximately 20 months ago. It has worked flawlessly and been well taken care of. Only until recently, maybe 3 weeks after I updated to IOS update 7.1.1, I have been having a plethora

  • How can I change the apple ID linked with my mac ?

    Hi Everyone, I just bought my first MAC, pretty excited and since I am begginer a few questions has arise, hopefully you can help me with this one.  When I first start doing the setup since i was in a rush I did not took the time to create a new appl

  • Is it possible to remove unseen font references from an .fm file?

    We have used a Framemaker book template that was created about 15 years ago to create technical manuals. We've modified this template many times. It's pretty complex, but the main purpose is to keep the appearance, structure, etc., consistent among m

  • ConvertDateTime problem in MyFaces

    Hi All. I have used the <f:convertDateTime> to covert the date in input text field and its always displays one day back if time part of date is 00:00:00. While i update the date in DB i converted the date using the DateFormat, to get the date field o

  • Weblogic could not started

    Hi Gurus, We are having a problem in starting the weblogic server after modifications done in the Admin tool (we gave privileges to Subject Areas to certain users). We also created new application roles in EM and give these roles privileges to access