Need help to parse the xml string to populate the drop-down list

Here is my: problem

I have a hidden text field that contains the text of an xml

<>facilities
< building >
< name > Building A < / name >
< name > building B < / name >
< name > building C < / name >
< name > building D < / name >
< name > building E < / name >
< name > building F < / name >
< name > building G < / name >
< name > building H < / name >
< / build >
< / facilities >

My goal is to read this with JavaScript xml string to populate a drop-down list with values of element (name). Does anyone know how script that?

Attached is a sample .xdp

See you soon,.

Jesse

Here is an example of change. I put the code click on the button, so you can see it in operation... You can place this code in the event that makes sense for you. I also added another field to show the DOM (this is for debugging purposes and you can remove this field if you want).

Paul

Tags: Adobe LiveCycle

Similar Questions

  • Need help to fill in a text box in a drop-down list.

    I think I have most of the code and correct settings, but I need help.

    I have a drop down list that is populated with 3 States. When a certain State is selected in the drop-down list, I need a text box to fill with tax information for each State. I list them set up variables that define the drop-down list data and the data that I want to appear in the text box. I also code basic javascript in place - but it is not perfect.

    The problems I'm having with the dynamic .pdf file include:

    1. where a State is selected in the drop-down list, the user must first click the text box so that the appropriate text appears in the box.

    2. when a State is selected in the drop-down list and the user clicks on the text box to display the text of tax info, tax info text does not change as it should if a user selects a different State in the drop-down list.

    3. the tax information in the text box will appear for 2 States (what is because the variable list that I put in place for these States has too many characters of text? Is there a way to bypass this limitation?)

    Can someone help me change the javascript code and settings that I use to make the text field to fill in correctly? It is the first project of livecycle that I tried and my first experience with javascript.

    Here's the file I'm working on:

    http://www.filedropper.com/outofstatetaxtemplate2

    Just discovered this chapter sample of Peachpit Press which talk about whatever it is you are trying to do.

    http://www.Peachpit.com/articles/article.aspx?p=1021020&seqNum=4

    They provide even a sample download in order to examine the code. Change the numeric field in a text field, and you're all set.

  • Help to associate the drop-down list on the price menu Options in another field

    Hello.  : (

    I'm not a programmer but I wrote the code before.

    (Certainly never written in JavaScript...)

    I work for some non-profit and they asked me to fix their PDF to associate the elements of price...

    I thought it would be relatively simple in LiveCycle... but not for me, anyway...

    I have a few fields called Description0, Description1, etc... who has a drop DOWN menu allows you to select an option.

    I want the ability to associate a price field and update according to the selected item in the menu dropdown.

    I'm totally lacking however, it would seem...

    Advice would be appreciated. : )

    I wrote something like this:

    function descriptionChange (newDescription) {}

    {Switch (newDescription)}

    case "Lifepak CR Plus Charge Pak (a set of electrodes and a battery):

    this.resolveNode("UnitPrice.UnitPrice").rawValue = "80";

    break;

    case "Lifepak CR Plus Charge Pak (two sets of electrodes and a battery):

    this.resolveNode("UnitPrice.UnitPrice").rawValue = "107".

    break;

    case "Lifepak CR Plus Pedi touch Starter Kit":

    this.resolveNode("UnitPrice.UnitPrice").rawValue = '139 ';

    break;

    case "Pedi toppings Lifepak CR more than spare":

    this.resolveNode("UnitPrice.UnitPrice").rawValue = "99";

    break;

    case "Philips HeartStart FRx battery":

    this.resolveNode("UnitPrice.UnitPrice").rawValue = "153";

    break;

    case "Philips HeartStart FRx adult Pads (1 set):

    this.resolveNode("UnitPrice.UnitPrice").rawValue = "50";

    break;

    case "Philips HeartStart FRx infant touch":

    this.resolveNode("UnitPrice.UnitPrice").rawValue = '98 ';

    break;

    case "(10), Zoll Type 123 Lithium batteries lasts 5 years":

    this.resolveNode("UnitPrice.UnitPrice").rawValue = "75";

    break;

    case ' Zoll CPR - D Padz, five year duration of life ":

    this.resolveNode("UnitPrice.UnitPrice").rawValue = "169";

    break;

    case ' Zoll Stat Pads II, 2 two parts pads, 2 years shelf life:

    this.resolveNode("UnitPrice.UnitPrice").rawValue = "59";

    break;

    case "Cardiac Science G3 Plus battery":

    this.resolveNode("UnitPrice.UnitPrice").rawValue = "395";

    break;

    case study ' science heart G # more Pads (1 set):

    this.resolveNode("UnitPrice.UnitPrice").rawValue = "49.95;

    break;

    case "furniture":

    this.resolveNode("UnitPrice.UnitPrice").rawValue = "200";

    break;

    case 'AED wall sign-3D ":

    this.resolveNode("UnitPrice.UnitPrice").rawValue = "15";

    break;

    } //end switch

    } //end function

    and then for each Description0, 1... I put in like this:

    var newDescription = this.boundItem (xfa.event.newText);

    DescriptionChange.descriptionChange (newDescription);

    Help please? : )

    Sorry if my question is too simple... or I'm just too much of a failure...

    When you create your fall down, after putting in your list of items, select the link tab in your object palette. Check "specify the item values. For each item, change its numerical value (e.g. text: "Lifepak CR Plus Charge Pak (a set of electrodes and a battery)' value would be 80).

    In the case of calculation of your UnitPrice field select the FormCalc language and insert the script:

    Sum (Discription0, Description1)

    Add some drop downs you must be included in the total.

    Tip: Name all your drop-down menus, the same thing and all that you have to ask, because the script is: sum (Description) [*]

    Kyle

  • Bind the drop down list to XML response from the web service

    In Designer ES2, I'm trying to populate a drop-down list with the data returned by a web service, but can't seem to get the link right.

    I created a web service using Workbench, which returns the following XML data (shown here in a text field for test purposes):

    image1.PNG

    However, when I bind this to the DataDropdownList control, LiveCycle seems to be putting the entire XML document in the drop-down list.

    Liaison:

    image2.PNG

    (Full text of the link is connectionData.groupLeaderWebService.Body.invokeResponse.xmlData.document.)

    Result:

    image3.PNG

    Therefore, a connection is made and the web service returns data, but it is not bound correctly as items in the list.

    I need the drop-down list to display the individual names returned by the web service.  Finally, it probably will be expanded to include the name and identification number (text and value, respectively).

    Can you see where I am going wrong with this?  Any help would be appreciated.

    Thank you!

    Toby

    Oops. Good fishing. This should be pls.loadXML (form1.page1.footer.lots.rawValue, 0, 1);

  • I need to rearrange the order of the 'required securities' at the top of the drop-down list bookmark.

    Hi, useful friends Firefox,.

    I need help to reorganize my combo of bookmarks to make things run in the way that I like. I am former fighter user of Firefox (and Mozilla/Composer etc. way back when). I use Firefox 42.0 on openSUSE 13.2. These two are completely up to date. I'm a fan of Firefox, which is the only browser that I use on my laptop.

    My question is about how to prefix some unwanted with "ZZZ -" titles to make sure they appear only at the bottom of the drop-down list of bookmarks, rather than at the top. The problem is that these six tracks only appear on the list box dropdown bookmarks when I press < Alt > + < B >. They do not appear in the window "library / all bookmarks" in a way I can modify them to insert the prefix. The six titles that I want to move to a more appropriate (and less prominent) space in the list are:
    View all bookmarks
    Bookmark this page
    Subscribe to this page
    To bookmark all tabs
    Bookmarks toolbar
    Download bookmark modules

    I won't be taken away entirely optional. That's why I wish they were downstairs. I just want to get them out of sight, since I was a very organized hierarchy within my bookmark system. I always use strikes, never the pointer clicks, allowing access to my favorites. Those with six in my view area when I opened my favorites to get some desired that URL seems unnecessary. By placing a prefix ZZZ - in front of them, they in alphabetical index would be at the bottom of the list, rather than at the top.

    I would like any ideas you have to help me move these six titles.

    Thank you

    Dave

    Those are the elements that appear in the list by default.
    You can try to give them a higher value of - moz-box-ordinal-group to reorder the items and move them down.
    All items have to - moz-box-ordinal-group: 1 by default.
    You can set the number to set a specific order of each of the elements.

    Add code to the file userChrome.css below default @namespace.

    @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
    
    #bookmarksToolbarFolderMenu,#bookmarksMenuItemsSeparator {-moz-box-ordinal-group:10}
    #bookmarksShowAll, #organizeBookmarksSeparator {-moz-box-ordinal-group:15}
    
    #menu_bookmarkThisPage,
    #subscribeToPageMenuitem,
    #menu_bookmarkAllTabs {-moz-box-ordinal-group:11}
    
    #menu_unsortedBookmarks {}
    

    The file userChrome.css (UI) customization and userContent.css (Web sites) are located in the folder of chrome in the Firefox profile folder.

    See also *.

  • When exporting my image in LR I select my brand of water in the drop-down list. Then I need to select 'Edit watermark' since the same drop-down menu in order to replace it. When I do that and click 'done' the watermark disappears in the export me

    When exporting my image in LR I select my brand of water in the drop-down list. Then I need to select 'Edit watermark' since the same drop-down menu in order to replace it. When I do that and click 'done' the watermark disappears in the box menu to export. When I click on "Export" the image exports WITHOUT my watermark. Help, please. As I did about everything that has been suggested in this forum and I still have this problem.

    I saw that too. For now, the workaround is that if you select 'Edit watermark,' when you are done editing be sure to reselect the same watermark. If you do not, the watermark menu will be empty.

    It seems to be a known bug that occurs only in the current version. If all goes well, it can be fixed in the next update. There is a page for her on the Photoshop/Lightroom Feedback site. I've added my vote to the page:

    LIGHTROOM CC - watermark on the question of export

  • Prepopulate the drop-down lists with xml file

    Hello world

    I'm trying to prepopulate a dropdown list using an xml file. There are many tutorials on the internet that allows me to do from the overview of the Designer tab. However, when I did it worked well, but I am not able to 'embed' the xml file so that the values appear in the workspace when the user starts a process.

    I tried to load the xml file with the contents of resource reading in the action profile of the first task and put the result in the "xmlPrepareData" but the problem is that I can't put all the values of the xmlPrepareData after because the xml model is not exactly the one used by LiveCycle.

    Any thoughts? Someone is already managed to prepopulate a dropdown list with an XML within the process?

    Kind regards

    Thomas

    OK gr8...

    Assuming you're able to get the XML process LC to your XDP/PDF form field.

    You can fix the XML from the drop-down under-

    clear the drop-down list box
    * DROPDOWN_Field.clearItems ();

    choiceList = XMLData.parse (* XML_Field.rawValue, false);

    divide the choiceList in an array of values

    choice = choiceList.resolveNodes("root.element[*].*NODENAME");

    var numchoices = choices.length;

    Adds an array of values in drop-down list
    for (var i = 0; i)< numchoices;="">

    {
    * DROPDOWN_Field.addItem (choices.item (i) .value);
    }

    * DROPDOWN_Field - is your field drop-down list.

    * XML_Field - is your XML data stored in a TextField.

    * NODENAME - is the name of the node in your XML to solve.

    I hope that Hepls...

    Regards-

    Chalukya.

  • I think it would be helpful if when you open the drop-down list for a 3D object keyframe controls have the same color as the 3D arrows in the project window.

    3D colors.jpgI think it would be helpful if when you open the drop-down list for a 3D object keyframe controls have the same color as the 3D arrows in the project window.

    You can suggest that here:

    Feature request/Bug Report Form

  • Increase in the drop-down list values

    Hello

    How to increase not the drop-down list in the time values?

    I tried to use this

    http://obiee101.blogspot.com/search/label/prompt.

    but not helped me


    Suresh-

    Hello

    Try adding the following to the instanceconfig.xml


    nnnn

    where nnn is the number of lines that you need to answer to the.

    Ian

  • Change the number of items in the drop-down list box when running

    I'm trying to change the number of items in one of my boxes of comobo.

    I have been through the help and this forum and have the values to within the drop-down list box change very well, but in a scenario, I want to go to three options for 2. And according to other choices to 3.

    I guess I have to use a property node but I can't understand that one.

    You can use the method to reset to zero (using an invoke node) before setting the [Strings] (after setting the value by default an empty array) or create an Xcontrol (you can see examples of LabVIEW for xcontrol).

    Ben64

  • The drop-down list property

    Hello

    I'm new to labview

    I select the array of string data (for example: name of user) database and I want to write in the drop-down list. How can I do it.

    Is any body can help me?

    OK, but what is your question? How to get data from a database? You have the Internet Toolkit? If not, you can use LabSQL (Google it). How to fill a combobox? You can fill a combobox by writing to the property of Strings []:

    To learn more about LabVIEW, it is recommended that you go through the material in the introduction, tutorials and other material in tutorials the NI Developer Zone Learning Center , which provides links to other materials and other. You can also take a course online for free.

  • How can we change the visibility of the drop-down list after its creation?

    I create a QML document with three drop-down lists.  Depending on how "trans_type" is selected, only to drop Extra should be displayed.  If the option "account" is selected, the drop-down list is visible and the DD category is hidden.  The reverse is true if the 'category' option is selected.

    Here's how I build my QML document:

    void Testing::updateFields()
    {
        if (m_form.isNull())
            return;
    
        // Clear all fields from the form
        m_form->removeAll();
    
        // Clear the internal mapping
        m_fields.clear();
    
        //get the transaction page ready
        QmlDocument *qml = QmlDocument::create("asset:///transaction.qml").parent(this);
    
        DropDown* trans_type = qml->createRootObject();
        trans_type = DropDown::create().title("Transaction Type");
        trans_type->add(Option::create().text("Accounts").value("0"));
        trans_type->add(Option::create().text("Categories").value("1"));
        trans_type->setSelectedIndex(0);
        connect(trans_type, SIGNAL(selectedIndexChanged (int)), this, SLOT(onDDChange(int)));
        m_form->add(trans_type);
    
        DropDown* account_dd = qml->createRootObject();
        account_dd = DropDown::create().title("Account");
        account_dd->add(Option::create().text("No Account").value("0"));
        //... code to populate account drop down here...
        account_dd->setSelectedIndex(0);
        m_form->add(account_dd);
    
        DropDown* category_dd = qml->createRootObject();
        category_dd = DropDown::create().title("Category").visible(false);
        category_dd->add(Option::create().text("No Category").value("0"));
        //... code to populate category drop down here...
        category_dd->setSelectedIndex(0);
        m_form->add(category_dd);
    
    }
    

    Everything is displayed properly on the page.  onDDChange is called and it shows a Toast that the option has been selected.  Here is what I currently have in onDDChange:

    void Testing::onDDChange(const int &info)
    {
        QString msg = "Switched To: ";
        if(info == 0) {
            msg = msg + "Account";
        } else if(info==1) {
            msg = msg + "Category";
        } else {
            msg = msg + "Unrecognized";
        }
        showToast(msg);
    }
    

    I can't figure out how to get the drop down lists to be visible/hidden depending on the needs.  There is a function "setVisible()" for the drop, but I can not understand how to operate without the app crashing.  http://developer.BlackBerry.com/Cascades/reference/bb__cascades__dropdown.html#function-setVisible-v...

    My questions are:

    1. How can I change the visibility of the appropriate dropdown lists in a different function when the status of the main drop-down list is changed?

    2. is there a way to define an id for drop-down lists?  If not, how am I supposed to go into the drop-down lists in a variable later so I can receive their value or change the visibility?

    Any help would be great.  I've been struggling with this for a while.

    There are a number of methods you could use signals and slots between your code and the QML or something simple is assign "objectName" as a property, then this search in C++.

    http://developer.BlackBerry.com/Cascades/documentation/dev/integrating_cpp_qml/

    Something like

    DropBox db = mRootContainer->findChild("dropboxname");
    db->setVisible(true);
    
  • When we choose the radiobutton control should display the drop-down list of choices...

    Hello

    Can u help me pls how to get the drop-down list option when we choose control radiobutton in the same screen.

    When deselect us it, he must hide the drop on the with on screen no matter what accent...

    Thanks in advance...

    u r Correct.

    Acutally we work on popupscreen with transparency.

    I use the 4.3 sound support for setmargin(4.5 doesn't).

    I went through the doc 4.5 Finally I got the result.

    I need to set the drop down just below the dropdown list how can I without no hardcode... pls let me know...

    now iam using setmargin (encode);

    If you have any advice that can help me in pls reffer me programming skills.

    I wil get u was pushing for the next...

    Thank you for your way of orientation...

  • Selection in the drop-down list box determines the text to display in another box - ideas?

    Hello, my name is Zac.  I spent a lot of time trying to figure this one out for myself, but I couldn't find what I needed.  A few threads looked promising, but I realized that they only apply to the LiveCycle.  Many other threads link to discussion 2006 Thom Parker on this subject, but it is very advanced and I feel that what I need is not as complex as the solution he proposes.  I've never used Adobe Acrobat until a few weeks ago, but with the help of Bernd Alheit and George Johnson I managed to create a document with fly-out help windows and scrolling lists and radio buttons which dictate the choice.  It's great and it works.  The last thing I have to do is to create a text box (or some kind of box) which will display a pre-written block of text based on the user choice in another area (a drop-down list box).  Like this:

    image for forums 2.PNG

    I wish, it is also easy to create because it draw a picture of him!  If the user selects "Algebra 1", for example, a specific description display below.  There are a lot of courses and descriptions, and the descriptions are long enough (as shown).  It is not necessary for the user to make changes to the description - in fact, which would be terrible.  But I would like to be able to copy text from it and paste the text in another area of text on the same page.

    Thank you very much, all those who have ideas please share them! Again wild guesses. I learn from all this.

    -Zac

    This involves using a script. If you want to write the code yourself read this tutorial:

    https://acrobatusers.com/tutorials/change_another_field

    If you don't feel like messing around with the code, you can use this tool that I developed to easily set up with the help of an input file:

    Scripts custom Adobe: Acrobat - fill the drop-down list

  • How to call a taskflow based on results from the drop-down list. ?

    Hello

    I want to call a taskflow based on the results of the drop-down list, I have a drop down list with LOV, if I choose a value insofar as it must call the taskflow are entrusted to him. How to do this. ?. How to assign a taskflow for all values and how to call it. Someone please help...

    Page:

    http://Java.Sun.com/JSP/page"version ="2.1 ".

    xmlns:af ="http://xmlns.oracle.com/adf/faces/rich" >. "

    valuePassThru = 'true '.

    valueChangeListener = "#{SelectBean.onSelection}" > "

    Main.XML (TaskFlow);

    http://xmlns.Oracle.com/ADF/controller"version ="1.2">

    Choose

    Choose.JSFF

    /Web-INF/FirstTF.XML

    FirstTF

    /Web-INF/SecondTaskFlow.XML

    SecondTaskFlow

    Choose

    First

    FirstTF

    Second

    SecondTaskFlow

    Code VlaueChange Listner already told you.

    First and second pages only contain output text component in my example. I think that is not necessary

    Concerning

    Vincent

Maybe you are looking for

  • "Export data" box on the site Https shows in html and cannot export.

    First I restored the computer to sleep and it worked but then I reinstalled Firefox and it is not new.I have nec auto-updates to update Firefox, so must be a recent update of the cause of the problem but can not send someone on the site and SagePay w

  • SmartWatch errors

    Hellofirst of all, I want you to know I love all Sony products but right now I have a problemI have Sony Xperia Z1 Compactand SmartWatch 2they worked fine, but after updateing my Android to be compact z14.4.4 build number 14.4.A.0.108 There is error

  • replacement of the keyboard to the other language

    Hello... Inspiron 15R SE 7520 version is available in several languages for the keyboard... Arabic.. Spanish..  US English... etc, and I can't find a replacement for my keyboard UK question... I live in the Sultanate of Oman,... If I can use any keyb

  • Keyboard does not not in repair system screens or install Windows

    Hi, I have had fairly recently built myself a new pc and bought a copy of Windows 7 on the offer of the student they were running. I got all this and running for ages now, installed games, played against them, it is fully functional. Recently I wante

  • Problem chart icon

    My icons do not have the correct graphics. They work very well. I just need to know what is the cause, how to prevent, & how to fix it.