Creating a dropdown list which is depending on the selections from 2 other dropdown lists

Hi,
I'm new to LiveCycle and JavaScript and I was hoping someone could help me with this form I am creating.
This is what I want it to do:
I have a dropdown list named 'Area' which drops down to 3 options.  Once the form filler selects an area, they will then select an option from dropdown list 2 which is named 'Brand'  (there is up to 5 options), I then I want dropdown list 3 named 'Address" to have all of the address of the area and brand selected.
Is this possible?
Thankyou for your help!!

Hi,
here is an example for three dropdowns with dependencies.
You have to copy this code in the change-event of the fist dd:
Number and Letter are the entries in my example in the first dd. You have to adapt to your entries. Then you have your object names change in the script.
DropdownListe2.addItem("123"); - this phrase you could use several times (in your example 5x for the second dd)
switch (xfa.event.newText)
    case "Number":
        DropdownListe2.clearItems();
        DropdownListe3.clearItems();
        DropdownListe3.rawValue = null;
        DropdownListe2.addItem(" ");
        DropdownListe2.addItem("123");
        DropdownListe2.addItem("456");
        DropdownListe2.selectedIndex = 0;
        break;
    case "Letter":
        DropdownListe2.clearItems();
        DropdownListe3.clearItems();
        DropdownListe3.rawValue = null;
        DropdownListe2.addItem(" ");
        DropdownListe2.addItem("A");
        DropdownListe2.addItem("B");
        DropdownListe2.selectedIndex = 0;
        break;
    default:
        break;
This code you have to copy in the change-vent from the second dropdown:
switch (xfa.event.newText)
    case "123":
        DropdownListe3.clearItems();
        DropdownListe3.addItem(" ");
        DropdownListe3.addItem("123_aa");
        DropdownListe3.addItem("123_bb");
        DropdownListe3.selectedIndex = 0;
        break;
    case "456":
        DropdownListe3.clearItems();
        DropdownListe3.addItem(" ");
        DropdownListe3.addItem("456_aa");
        DropdownListe3.addItem("456_bb");
        DropdownListe3.selectedIndex = 0;
        break;
    case "A":
        DropdownListe3.clearItems();
        DropdownListe3.addItem(" ");
        DropdownListe3.addItem("A_1");
        DropdownListe3.addItem("A_2");
        DropdownListe3.selectedIndex = 0;
        break;
    case "B":
        DropdownListe3.clearItems();
        DropdownListe3.addItem(" ");
        DropdownListe3.addItem("B_1");
        DropdownListe3.addItem("B_2");
        DropdownListe3.selectedIndex = 0;
        break;
    default:
        break;
Here you will find an example:
https://workspaces.acrobat.com/?d=WjPa976zd1Ekdahx9r9kUw
Hope it will helps you,
Mandy

Similar Messages

  • Trying to get a fourth field to populate based on the selection from three other dropdown menus.

    I would like the Treatment Classification field to populate with a combination of text and numbers based on my selection from three other drop down menus.
    For example:
    If I select "0-No Hurt" in the AHL field, "0-No Hurt in the PHL field, and "Near Miss in the Treatment Choice field, then the Treatment Classification field would populate to "L00NM".
    If I select "2-Moderate Hurt: in the AHL, "4-Fatality" in the PHL field, and "Restricted Work Incident" in the Treatment Choice field, then the Treatment Classifiaction field would populate to "L24RWI".
    If I select "1-Minor Hurt" in the AHL field, "4-Fatality" in the PHL field, and "Medical Treatment Incident" in the Treqatment Choice field, then the Treatment Classifiaction field would populate to "L14MTI".
    Etc, etc, etc.
    I could then fill in the resyt of the script with the required text.
    Not sure how to load my PDF file.
    Thanks,
    Rick

    Do your dropdown list items currently have export values set up? It seems like the value you want to construct is simply concatenating the values of the three dropdowns, and this would be easy if you set the export values of the list items appropriately. For example, the export value for the "0-No Hurt" item would be 0 and for "Near Miss" it would be "NM", etc., so the script could look something like:
    // Get the values of the drop downs, as strings
    var v1 = getField("AHL").valueAsString;
    var v2 = getField("PHL").valueAsString;
    var v3 = getField("Treatment Choices").valueAsString;
    // Set this field's value
    event.value = "L" + v1 + v2 + v3 + "other text goes here."

  • ALV GRID WITH SUMMATORIES DEPEND OF THE SELECTION

    Hi Experts.
    I have a form, in which depend of the selection, I show to user a fieldcatalog with the data (query) that the user want to see in that moment ...
    The problem is that the user want to see one field (amount, sum total (money) ...etc) with summatories, group by date, person...or other depend of the selection he has done in the select dynpro.
    How can I do it when I show the ALV??... The user don't want to use the option to make a lot of select dispositions in the ALV..., he want to see the disposition of the data depend the selection he do in the select dynpro.
    I see when I create the fieldcatalog to the ALV GRID, there is a field ... do_sum, I have marked it, in the field which I want to do a summatory but don't do anything in the ALV when display.... and don't find how indicate in the fieldcatalog the field which I wan't group by...
    Other options, that I have thought it's to make a lot of dispositions in ALV, and when display de ALV try to get the disposition that I want ... but I haven't did it.
    Thanks.

    Hi all,
    it is maybe too late to answer this question but I hope it can serve someone who bumps into this problem in the future.
    I managed to activate the functions with the following code:
    DATA alv       TYPE REF TO cl_salv_table.
    DATA: lo_functions TYPE REF TO cl_salv_functions_list.
    DATA: lo_funcs TYPE salv_t_ui_func.
    DATA: lo_func TYPE salv_s_ui_func.
      cl_salv_table=>factory(
           IMPORTING r_salv_table = alv
           CHANGING  t_table      = <fs> ).
    *   Default Functions
         lo_functions = alv->get_functions( ).
         lo_funcs = lo_functions->get_functions( ).
    * loop through all functions and enable them and set them visible.
    * here u can also activate separate functions if you check the name with the method from r_function (CL_SALV_FUNCTION->GET_NAME)
         LOOP AT lo_funcs INTO lo_func.
           lo_func-r_function->set_enable( value = 'X' ).
           lo_func-r_function->set_visible( value = 'X' ).
         ENDLOOP.
         alv->display( ).
    Cheers,
    Ilina

  • I am not able to access Firefox under one user account on my computer so I created another account. How can I transfer the bookmarks from the old account?

    I use windows Vista and I cannot open Firefox under one user account (I keep receiving the "firefox profile cannot be loaded . . ." error message) on my computer so I created another account. How can I transfer the bookmarks from the old account?

    NOTE: you can skip this 1st step.
    Step 1
    I'm on Win7 so the paths might be slightly different... C:\Users\(YOUR PC ACCOUNT)\AppData\Roaming\Mozilla\Firefox\Profiles\bnelgkol.default\bookmarkbackups ... Find the "bookmarks-[DATE].json" you want and copy it to the profile you want. You may want to change the date to a name you will recognize.
    Step 2
    Then on your browser "Bookmarks>Show All Bookmarks or Ctrl+Shift+B ". This will bring up the Bookmark Organizer, I think they call it Library now. From there click "Import & Back up>Restore" this will bring up a drop down with your back ups. If you followed step 1, find the json you added and select it. If you skipped step 1, from "Import & Back up>Restore" select "Choose File..." Then browser for the json you want to import. Which should be in a similar location as mentioned in step 1.
    NOTE: "AppData" is a hidden folder, will have to set show hidden folders to be able to see it.

  • How can I import pictures from my iphone to PC which I imported to the iphone from another PC? The folder doesn't show on my computer. I see all other pictures I took with the phone but not the imported folder.

    How can I import pictures from my iphone to PC which I imported to the iphone from another PC? The folder doesn't show on my computer. I see all other pictures I took with the phone but not the imported folder.

    Photos that were synced from a computer won't show for copying to a computer. If you want to copy them back then you will need a third-party app on your phone such as Simple Transfer which can copy them off via your wifi network. But photos are 'optimised' when they are synced to a device, any that you then copy back to a computer may not be exactly the same as they originally were on your computer (e.g. their dimensions might be different and their colours may look a bit different).

  • Creating a Master virtual hard disk and using the same for all other VM's

    Hi,
    We would like to create a master virtual hard disk and use the same for all other VM's. Can we do that ?
    my requirements :
    1) create 10 VM's
    2) first create a master virtual hard disk with win OS and use the same to create the 10 VM's.
    3) After creating the VM's change the HDD size.
                  -- if i have created master virtual disk with 500GB , and use the same for creating a virtual machine. can we change the HDD size to 1TB ?
    After creating the VM's ,i will change the system names and activate the windows accordingly.
    Will there be any implications ,if we can/will do like this.
    Thanks.

    Hi Suren424,
    I think Using Differencing Disks may cover your needs .
    Please refer to following setps:
       "Create the Parent Virtual Machine Configuration and Virtual Hard Disk
        Install the Operating System, updates, and common software
        Generalize the installation
        Prepare the parent virtual hard disk
        Create the differencing disks
        Create virtual machines that use the differencing disks
    For details please refer to follwing link:
    http://social.technet.microsoft.com/wiki/contents/articles/1393.hyper-v-virtual-machine-vm-parent-child-configuration-using-differencing-disks.aspx
    Hope this helps
    Best Regards
    Elton Ji
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • I have 3 songs waiting to download for 3 days. I am unable to swipe to delete and I have rebulit my itunes libary which did not remove the songs from my phone. What do I need to do to get rid of these songs?

    I have 3 songs waiting to download for 3 days. I am unable to swipe to delete and I have rebulit my itunes libary which did not remove the songs from my phone. What do I need to do to get rid of these songs?

    Hi RadarCat16,
    Welcome to the Apple Support Communities!
    I know it can be frustrating when you are waiting for content to download to your iPhone from the iTunes Store. There are a few steps I would recommend in this situation. Please read over and follow the steps in the attached article.
    iTunes: How to resume interrupted iTunes Store downloads
    http://support.apple.com/kb/HT1725
    If your download was interrupted using your iPhone, iPad, or iPod touch
    From the Home screen, tap the iTunes app.
    For iPhone or iPod touch, tap More > Downloads. For iPad, tap Downloads.
    Enter your account name and password if prompted.
    Tap the blue download arrow to resume.
    If you can't complete the download on your iOS device, you can download it in iTunes on your Mac or PC and then sync it to your iOS device. You can also transfer purchases from your iPhone, iPad, or iPod to a computer.
    Have a great day,
    Joe

  • [svn] 1012: Merging change 1011 ( for newer concurrent libraries which must be passed the return from

    Revision: 1012
    Author: [email protected]
    Date: 2008-03-28 17:08:06 -0700 (Fri, 28 Mar 2008)
    Log Message:
    Merging change 1011 (for newer concurrent libraries which must be passed the return from
    schedule, not the arg we passed into schedule).
    Modified Paths:
    blazeds/trunk/modules/core/src/java/flex/messaging/util/TimeoutManager.java

    Verify from permission of user that you use it in upgrade, make sure that scom machine and user that you use it in upgrade in sysadmin group in database of operationsManager and OperationsManagerDW
    Also Verify from Prerequisites of Upgrade SCOM 2012 sp1 as below link
    http://technet.microsoft.com/en-us/library/jj656654.aspx
    Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question, please click "Mark As Answer"

  • Which libraries depend on the JNI?

    Wondering if any1 knew where i could find some list of libraries which depend on the JNI and hence vwould not be fully portable across JVM's.
    I am trying to distinguish between fully portable libraries (e.g. pure java code) and libraries which would need some re-write to operate on different JVM's.
    Or does anyone know HOW i mite find this out?
    Ragards
    Danny

    Right, so then on to my real question
    So if any machine with a JVM should run any java code,
    why then do some of the JSR's (on jcp.org) ask for
    api's to be migrated from J2SE to J2ME, is this just a
    request for the class files for these packages to be
    slimmed down and re-packaged?One reason is because only so much can fit on the targets. And the more there is the more room is needed. That is true whether it needs native libraries or not.
    Another reason could be that the functionality simply does not exist.

  • Hoiw to create a thumbnail image which doesnt refer to the original

    I have a large buffered Image, I want to create a smaller version of the image and then release the memory taken up by the larger image
    Image smallImage = largeImage.getScaledInstance(size,size,Image.SCALE_FAST);This creates a small image but I think it is just a view over the larger image, how can I create it as standalone so I can release the memory used in the large image.

    Yes thats done the trick, code as follows:
    private static Image resize2D(Image srcImage, int size)
            int w = srcImage.getWidth(null);
            int h = srcImage.getHeight(null);
            // Determine the scaling required to get desired result.
            float scaleW = (float)size / (float)w;
            float scaleH = (float)size / (float)h;
            System.out.println("Image Resizing to size:"+size+"w:"+w +":h:"+h+"scaleW:"+scaleW+"scaleH"+scaleH);
            // Create an image buffer in which to paint on.
            BufferedImage bi = new BufferedImage(size,size,BufferedImage.TYPE_INT_ARGB);
            // Set the scale.
            AffineTransform tx = new AffineTransform();
            tx.scale(scaleW, scaleH);
            // Paint image.
            Graphics2D g2d = bi.createGraphics();
            g2d.drawImage(srcImage, tx, null);
            g2d.dispose();
            return bi;
    BufferedImage newImage = resize2D(origImage, 200);
    origImage.flush();
    origImage=null;

  • How to populate the second combo box by depending on the selection in 1st?

    I have two combo boxes, both of data in the lists come from the database. The list in the second will be changed when the selection is changed in the first one. I am trying to do query again in the ActionPerform function, unfortunately the list in second one doesn't change.
    I am learning Swing now, I really appreciate for any suggestions!
    Thanks

    camickr,
    I have another question for the tab pane. Now I have to remove the tab and add tab for updating the tab pane. I wonder if there is other way to do it. I really appreciate your help!
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    import org.hibernate.Session;
    import org.hibernate.SessionFactory;
    import org.hibernate.Transaction;
    import org.hibernate.cfg.Configuration;
    import java.net.URL;
    import java.util.Iterator;
    import java.util.List;
    import java.util.StringTokenizer;
    public class test_tabpane extends JPanel implements ActionListener {
         private JPanel MainPane;
         private JComboBox combobox2;
         private JTabbedPane TabbedPane;
         private JComponent panel1;
         private JComponent panel2;
         private String [] resources ={"ZZAA", "ZZAB", "ZZAC", "ZZAD"};
         private String selected_resource = "";
         public test_tabpane() {
              MainPane = new JPanel();
            MainPane.setOpaque(true);
            MainPane.setPreferredSize(new Dimension(600, 70));
            MainPane.setBorder(BorderFactory.createRaisedBevelBorder());
            combobox2 = new JComboBox(resources);
            combobox2.addActionListener(this);
            MainPane.add(combobox2);
            add(MainPane);
            UIManager.put("TabbedPane.tabInsets", new Insets(5,5,5,5));
            TabbedPane = new JTabbedPane();
            panel1 = makeTextPanel(resources[0]);
            TabbedPane.addTab("Language/Notes", panel1);
            panel2= makeTextPanel(resources[0]);
            TabbedPane.addTab("Relations/Coverage", panel2);
            TabbedPane.setPreferredSize(new Dimension(600, 340));
            TabbedPane.setFont(new Font("ariel", Font.BOLD, 11));
            TabbedPane.setSize(600, 340);
            add(TabbedPane);
         protected JComponent makeTextPanel(String text) {
            JPanel panel = new JPanel(false);
            JLabel filler = new JLabel(text);
            filler.setHorizontalAlignment(JLabel.CENTER);
        //    panel.setLayout(new GridLayout(1, 1));
            panel.add(filler);
            return panel;
         public void actionPerformed(ActionEvent e) {
                   JComboBox cb = (JComboBox)e.getSource();
                   if ("comboBoxChanged".equals(e.getActionCommand()))
                   //   if ("comboBoxEdited".equals(e.getActionCommand()))
                   //     System.out.println("in action:" + (String)cb.getSelectedItem());
                        String selected_string = (String)cb.getSelectedItem();
                        StringTokenizer st = new StringTokenizer(selected_string, "|");
                        selected_resource = st.nextToken();
                        updateTabbedPanes(selected_resource);
        protected void updateTabbedPanes(String selected_string) {
             panel1 = makeTextPanel(selected_string + " in Language/Notes");
             int index = TabbedPane.indexOfTab("Language/Notes");
             TabbedPane.remove(index);
             TabbedPane.insertTab("Language/Notes", null, panel1, "", index);
             panel2 = makeTextPanel(selected_string + " in Relations/Coverage");
             index = TabbedPane.indexOfTab("Relations/Coverage");
             TabbedPane.remove(index);
             TabbedPane.insertTab("Relations/Coverage", null, panel2, "", index);
        * Create the GUI and show it.  For thread safety,
        * this method should be invoked from the
        * event-dispatching thread.
       private static void createAndShowGUI() {
               JFrame.setDefaultLookAndFeelDecorated(false);
           //Create and set up the window.
             JFrame frame = new JFrame("test");
           frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
           //Create and set up the content pane.
           JComponent ContentPane = new test_tabpane();
           ContentPane.setOpaque(true); //content panes must be opaque
           frame.setContentPane(ContentPane);
           //centers a frame onscreen // it is a problem for wide screen
           //   frame.setLocationRelativeTo(null);
           frame.setLocation(300, 120);
           frame.setSize(1024, 768);
           frame.setExtendedState(java.awt.Frame.MAXIMIZED_BOTH);
           //Display the window.
          frame.pack();
           frame.setVisible(true);
          * @param args
          * This is main function.
         public static void main(String[] args) {
            //Schedule a job for the event-dispatching thread:
            //creating and showing this application's GUI.
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
    }

  • When creating a book how can I get all the photos from an album to show up in the order they were in the album?

    When creating a book in iphoto, how can I get all the photos from the album I want to use to show up in the order that they are in the album?  When I tried to use the option to add my own photos instead of having the program "flow" them, they showed up all mixed up.

    iPhoto puts them in the book in chronological order.  So to get your photos from an album into an iPhoto book in the same order you will need to use the Photos ➙ Batch Change ➙ Date menu option and set them all to the same date with a 1 minute time difference between each. 
    OT

  • How to populate a dropdown based on the selection from a previous dropdown?

    I am currently trying to build a spreadsheet with three different dropdown menus to choose from.  Based on what is selected from the first drop down though affects what choices are displayed for the next dropdowns.  Is this possible in Numbers? Or should I look for other alternatives for what I'm trying to do.

    Dynamic dropdown (pop-up) menus is not possible in Numbers directly.  If you use scripts you may be able to cobble something together.
    If you REALLY want pop up menus then place ALL the choices in a single pop up grouped together

  • Problem in populating 2nd combo box depending upon the selection of 1st

    Hi all,
    I have 2 combo boxes on my jsp page ,say continent and country . obviously the data in 2nd box is dependant on selection made in the 1st . I'm using MySQL with tomcat 5.0.7 . and JSP.
    The first combo box in one form and the 2nd in another. After submitting first i 'm populating the second combo also.
    But the problem is after submitting the first form the page gets refreshing and i can't see the selected continent in the first combo box.
    The javascript code used follows:
    function callCapture(form)
    var item = continent.cmbContinent.selectedIndex;
    document.country.hidContId.value=continent.cmbContinent.options[item].value;
    document.continent.action="country.jsp?hidContId="+document.country.hidContId.value+"&buttName="+document.country.buttName.value+"";
    document.continent.target="_self";
    document.continent.submit();
    some one pls help me asap !

    Hi Reegz,
    that's what i'm also doing and i'm successfull till populating the second combo box but how do I keep the previous inputs on the page and reload the page based on the change of a selection box?
    Is their any mistake in the javascript code:
    Here is the code:
    function callCapture(form)
    var item = continent.cmbContinent.selectedIndex;
    document.country.hidContId.value=continent.cmbContinent.options[item].value;
    document.continent.action="country.jsp?hidContId="+document.country.hidContId.value+"&buttName="+document.country.buttName.value+"";
    document.continent.target="_self";
    document.continent.submit();
    Pls help me...

  • Populating a Field depending on the selection of a dropdownlist in adobe fo

    Hi,
    I am not able to populate a Text Field based on the selection of a dropdownlist in Adobe forms in WebDynPro.
    Pls let me know how to do it????
    Thanks in Advance,
    Sameer

    Hi Sameer,
    There is one way to achieve this.
    You can write some javascript on event of selecting value in dropdown.
    Open your PDF form.Then goto menu "palettes" and then choose "script editor".
    Now, select your dropdwon element.
    It will show some line of scripting in Javascript of Formcalc.
    Here, you can write your JAVA script for displaying values in textview.
    If it helps then don't forget to award points
    Regards,
    Bhavik

Maybe you are looking for

  • My printer hp officejet pro 8600 prints but it doesn't scan.

    My Printer is printing but not scanning. I get an error message that is busy with another appliation or user. I'm the only user, and already close all other application. Product number is CM749A

  • My audio for songs all sound like chipmunks...

    I actually know what I did wrong...I just can't get it back. All audio on my computer is sped up. I uninstalled Microsoft Plus! Digital Media Edition, and did not know this would happen. I tried Restoring my computer to earlier dates but it will not

  • Broadband username-non recognition

    I have my e-mail from BT.com giving me my  BT Total Broadband username.  My hub and e-mail has been  connected and working for nearly two years. However when I try to log in to MyBT or anything to do with my Broadfband package I simply get the messag

  • Slow Graphics after update

    I just installed a bunch of updates for my relatively new macbook pro (end of 2009) and found that afterwards the computer's graphics became quite jerky (mainly the screen saver and expose - four finger swiping) while iPhoto shows all my pictures as

  • Early 2009 mac pro not recognizing DVD drives

    My Mac Pro 8 core since upgrading to Mavericks is not recognizing my Blu Ray drive unless I unplug it and re plug it in while hot.....what is this issue?