JavaScript to fill the text based on the drop-down list field

Hello

I'm trying to write a javascript script to fill a "Textfield" based on what I select in 'Dropdownlist control' this has on a relationship between them. I tried to integrate the script on the category of 'Change' and the script was the following, but it didn't work. I would be grateful if someone can help me with the correct procedure.

Thank you

Vijay

Form1. #subform [0]. DropDownList2 [0]: change - (JavaScript, both)

function populateDescription() {}

if (document.subform [0].) {DropDownList2 [0] .value == "BIH")}

document.subform [0]. TextField83 [0] .value = "Burn in and PBI history."

        }

}

I solved this problem by using a script to switch.

Please see my previous thread in this regard and Paul example will provide you with the right script for a script to switch.

http://forums.Adobe.com/thread/479021

script on the drop-down list as follows

Switch (this.rawValue) {}

case "dropchoice1".

FieldName1.RawValue = 'choice of text here ';

FieldName2. RawValue = "choice of text here ';

break;

case "dropchoice2".

FieldName1.RawValue = 'choice of text here ';

FieldName2. RawValue = "choice of text here ';

break;

}

Good luck.

Tags: Adobe LiveCycle

Similar Questions

  • I created a PDF form with several drop downs, all with the same drop-down values. When I select a value of 1 in the drop-down list fields, it breeds in all others - which I don't want. How can I fix?

    I created a PDF form with several drop downs, all with the same drop-down values. When I select a value of 1 in the drop-down list fields, it breeds in all others - which I don't want. Can I fix?

    I am fairly new to this, but I think it has to do with the way you have drop them downs named. Copy you a then keep stick in each area? If so, that's the problem. You must rename each with a different number: Dropdown1, Dropdown2, etc. I think this might solve the problem.

  • fill the drop-down list in a table - insert the value in another

    Probably, this should be easy, but do not know if my problem is with my design of the database or with my query from CF, etc.. The drop-down list is filled correctly, but nothing is not subject to the table "order". It is an Access database and the appropriate reports are configured in the db. Let me know if you need more details on my installation of db. I'll do the same thing later on the page with USERS ("outers checker"). I put this up to people Records check equipment ("equipment"). A table has the equipment, the other is supposed to record checkout of the shares ("order"). Here is the code for the drop down menu on the first page and in the action page and the request:


    Query = "qry_item."
    value = "id".
    display = "description" >


    FORMFIELDS = "id, fname, lname, phone, electronic mail" >

    It's pretty simple. You have a form called "Item" field
    Do you see 'Point' in the setting your tag FORMFIELDS?

    If you don't tell the tag to insert a field that's usually what you
    tell him and does not insert the field.

  • How to fill the drop-down list components installed?

    I have installed Eclipse and the blackberry for eclipse plugin that includes the component pack 4.5.0. I have installed all of the components listed on this page: http://na.blackberry.com/eng/developers/javaappdev/javaeclipseplug.jsp. The versions 4.2.1 and 4.3.0 are zip files that I add to Eclipse by using the software update-> add the site-> archive. Version 4.6.0 and 4.6.1 4.7.0 are exe files that settle in the location C:\Program Research In Motion\BlackBerry JDE component Package 4.x.x.

    In the folder plugins on the box, I see version 4.3.0 and listed 4.5.0 4.2.1. When I go on Blackberry JDE-> installed components and click the drop-down list box, the only pack component that I see is 4.5.0. How do the other components packs appear?

    Well it's resolved, I guess. After about 3 hours, the software updates-> add the site-> repository for the Blackberry update works. When I installed the components as a result, they appear in the drop-down list. It's a little confusing, because I already tried this at least 5 times and each time before eclipse was a java error when doing this.

  • How to fill a textfield based on a drop-down list and a checkbox control

    Hi guys,.

    I need help.
    first step: I have a drop down list, if I click in the dropdownlist control 'a' and place it in the digital field a number greater than 99, checkbox must be marked and second step: a textfield1 must be visible.

    the first stage works perfectly, but the second does not.
    This is my code for the second stage of the event: java script of change of

    If ((DropDownList1.rawValue == "a") & & (this.rawValue == 1))
    {
    TextField1.presence = "visible";
    }
    on the other
    TextField1.presence = 'hidden ';


    everyone has no idea why?

    Thank you!!

    Diana

    Hi Diana,

    You are on the right track. deleteItem is zero base; so if you want to remove the second point, it would be deleteItem (1).

    I would recommend a script similar to the output from the drop-down list, so that if the user goes back and changes the value, the same logic would apply. Also when you remove items from a drop-down list by using script, it is useful to addItem() again in the other part of the if statement. In this way, you can restore the list because the shape is changed.

    Also I would wrap the script in the numberField in another State to check for null first.

    Attached example.

    Good luck

    Niall

  • Fill the drop-down list in the SQL data source

    I have a data source that retrieves data from an sqlite database. How do I pass two areas of this query to a drop-down list on the page. I want to create a drop down list with the value and the text of this data source

    Hello

    To extract the values you need to wait for onDataLoaded. "data" parameter is a list of cards.

    An example of code for data access :

    http://supportforums.BlackBerry.com/T5/Cascades-development/SQLite-count-query/m-p/2477699#M27180

    http://supportforums.BlackBerry.com/T5/Cascades-development/DataSource-data-in-JavaScript/m-p/244171...

    To add an option to the menu drop-down:

    attachedObjects: [
      ComponentDefinition {
        id: optionFactory
        Option {
        }
      }
    ]
    
    ... to add an option:
    
    var newOption = optionFactory.createObject()
    newOption.text = 'Text to add' // or a variable fetched from data source//newOption.otherfields = ...
    dropdownId.add(newOption);
    
  • Fill the drop-down list on the duration box

    Hi all

    Please help me to fill in a drop-down list on the duration.
    vcclient_no: = FK_SPLIT (vcBuffer);
    vcpol_ref: = FK_SPLIT (vcBuffer);
    vcmake: = FK_SPLIT (vcBuffer);
    vcmodel: = FK_SPLIT (vcBuffer);
    vcchassis: = FK_SPLIT (vcBuffer);

    I need fill out the values of these variables to a drop-down list box.

    Take a look at the online help, there is a complete example.

  • Fill the drop-down list on the field with records DB

    Hello world

    I have a form that I created that collect address information and I would like to have the STATE field automatically filled from a DB field. Then I would that this choice in the field of State registration of users. Can someone suggest a good way for me to do this. I am DW3 with PHP and a mySQL DB.

    Thank you
    Robert

    ryonker wrote:
    > I have a form that I created that collect address information and I
    > would like to have the STATE field automatically filled from a DB field.
    > Then I would that this choice in the domain of the State for users
    > record.

    Create a recordset that contains the names of the States. Then insert a
    in your form menu item, and then click the Dynamic button in the property
    Inspector. Choose the set of records in the recordset field Options, and
    Then select the fields of the recordset that you want to use for the labels and values.

    --
    Adobe Community Expert David Powers
    Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • 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

  • Adobe Acrobat 9: Javascript populated the drop-down list box - response selected array will not save

    I have a combo on one of my forms box that is filled with the help of a Javascript array.  The drop-down list box is filling very well, but when an item is selected in this drop-down list box, the selected item does not save when the user saves the document.  Any suggestions as to what is the problem and how it can be corrected?  I am a loss to know where even to start the search.  Any help is greatly appreciated.

    Thank you.

    Lisa

    It seems that the drop-down list box may be getting filled with code that runs when the form is opened. If so, it will overwrite the value selected, whenever it opens. The solution would be to change the code so that it is not than that. If not, you can post the form somewhere so we can take a look?

  • Value of the drop-down list instead of the text

    I want a drop-down list that includes complete definitions for the user to watch but when they choose the item they want only the abbreviation indicating on the form. For example, in my items list is said 'Illinois', but when they select "Illinois" she fills the field with the bind value of 'IT '. Is this possible?

    See the attached file... If it helps...

    I place a TextField on the top of the drop-down list and setting the rawValue selected the TextField... In the case of exit of the combo I hide list drop-down and display of the textfield object. Similarly, in the event you enter in the text field, I am displaying the drop-down list field and hide the text field.

    This way I can show 'IT' If you choose "Illinois" in the menu dropdown.

    https://Acrobat.com/#d=7Y0qDg-ld6nWNxw8G-0cNg

    Thank you

    Srini

  • Fill in numeric fields according to the drop-down list

    Hello

    I am VERY new to Adobe LiveCycle so be gentle. I am trying to generate a purchase order. I made my drop-down menu with all the elements that they can choose to buy. I want the the user can select an item and have the corresponding prices for this item to be brought up in a column of prices, then the user can change the quantity and then the Total price column will calculate the price and quantity.

    Can someone help me with this? I drive myself nuts trying to figure it out on my own.

    Thank you

    Amy

    PS. I don't know how to write the script if it's what I do... Sorry

    PLLEAAASEE HELP

    The simplistic way to do is to assign prices as the values of the drop-down list in the "Binding" tab of the object palette.

    Then, in the case of calculating of the price (using formCalc) simply the name of the drop-down list field.

    When the item is selected, the price will appear in the price field.

    Good luck!

    Stephen

  • Automatically populate a drop-down list by using another selection from the drop-down list box

    New java/preparation forms so I apologize in advance.

    I currently have a menu drop-down box 1 (Occupation) with three options: "enter your own description/blank", retired housewife. When someone chooses either retirement or anyone at home, I would another drop box 2 (employer) to assign automatically "n/a. . The employer drop box has only two options: "enter your own/blank", N/A.

    Far, I could for that box to fill but only when the person clicks in the box (as if they were about to enter their own text.) Then only it will fill the drop-down list "employer." I would like it auto fill once the person has chosen retired, Virgin or stay-at-home woman without having to enter in the box (just using the arrow to the size of the drop-down list box).

    I currently have a key shot that resets the employer box when a person chooses the option vacuum/enter your own option. I then a JavaScript (only for the housewife now) that only works if you click the box of. Key combination works I want to than the other options work as well. If the client settles on white, the choice of the employer updates automatically empty without having to click in the box of. Any help (including general advice to make my code cleaner) is very appreciated!

    Current script of typing:

    If {(event.willCommit)

    If (event.value == "") this.resetForm (["use"]); of other SetFieldValues (event.value);

    }

    The current upward, mice running JavaScript :

    var v = this.getField ("Occupation") .value

    If (v is "Housewife")

    1. this.getField("Employer").value = "N/a".

    I think maybe I should use event.willCommit in my formula, but I'm not sure how to include it.

    Thank you!

    I would not use the key sequence or MouseUp actions for this, but the action post.

    Just make sure that you set the field option to validate the selected value immediately (under Properties - Options) and then use this code as the custom validation script:

    var employerField = this.getField("Employer");
    if (event.value=="Homemaker" || event.value=="Retired")
        employerField.value = "N/A";
    else employerField.value = employerField.defaultValue;
    
  • Automatic module in the drop-down list

    Is is possible to make a drop-down list to add a new element of list, every time someone entered something that is not already in the list?

    Thank you

    Josh

    • The script adds a "custom" name The names following the original crash. Is it possible to have the ability to add an unlimited number of additional items to the drop-down list?

    OK and I think v1.1 solves this problem. Testing, sorry, more tests can prove me wrong. The array must be initialized in the body of a function, otherwise, it gets recreated in each call to the script object. So I created a form (aka the global variable) variable to contain the initial data. With each release, event, I added a call to a function called checkData() that validates the entered value (either selected in the drop-down list or a custom text entry) does not exist.

    I am adding new values to the form variable and recreate the table of the form variable. This works very well for this use case, but I would discourage that adopting a form with several drop-down lists and/or a lot of data related to each dropdpown. You should really use data binding and put the processing on the server.

    Form1.Page1.Subform1.Dropdown1::exit - (JavaScript, client)

    If (! form1.page1.subform1.dropdown1.isNull) {}
    var str = form1.page1.subform1.dropdown1.rawValue;
    If (isNaN (str)) {}
    populateDropDowns.checkData (this);
    Form1.Page1.Subform1.dropdown2.clearItems ();
    Form1.Page1.Subform1.dropdown2.execInitialize ();
    }
    }

    Form1. #variables [0] .populateDropDowns - (JavaScript, client)

    stooge of var = new Array();

    function loadData (dropdownField) {}
    tenure = createArray();
    for (var i = 0; i)< stooge.length;="" i++)="">
    dropdownField.addItem (stooge [i]);
    }
    }

    function checkData (dropdownField) {}
    tenure = createArray();
    Check that the value is not in the table
    If (stooge.lastIndexOf (dropdownField.rawValue) ==-1) {}
    addData (dropdownField);
    }
    }

    function addData (dropdownField) {}
    var stoogeStr_ = stoogeStr.value;
    Check that the value is not in the global variable
    If (stoogeStr_.search(/dropdownField.rawValue/) ==-1) {}
    stoogeStr.value = stoogeStr.value + ', ' + dropdownField.rawValue;
    tenure = createArray();
    stooge.push (dropdownField.RawValue);
    dropdownField.clearItems ();
    loadData (dropdownField);
    }
    }

    function createArray() {}
    var stoogeStr_ = stoogeStr.value;
    tenure = stoogeStr_.split(",");
    return of foil;
    }

    • Because the initialization event again fills the drop-down list with the default Larry, Curly, Moe, the drop-down list loses 'tailor-made' entries on the reopening of the PDF file. Is there a way to save the final drop-down list, so that the options are there when the file is saved, closed and reopened its doors?

    This really requires a server solution or a rights compatible form that allows client-side XML import/export.

    Steve

  • Import or copy of list in the drop-down list Excel

    Can someone help me with this?  I have a list of 115 departments that I will fill the drop-down list in an acrobat pdf form and do not have time to enter them one by one...  Is it possible to import this list or to copy / paste?  Help, please...  Thank you very much!

    Here is a link to a very simple PDF file that shows how you can fill a combo box (aka drop down) with a list of items that can be pasted into a text field, after copying the Excel (or another source): https://acrobat.com/#d=sIJoabh12oYOY19AuTZ9yw

    The idea is that once the drop-down list is populated after having clicked the "Populate combo box" button, you can copy & paste the field to your form. Don't forget to search for duplicates and empty lines.

Maybe you are looking for

  • Can't print with Samsung DW2835

    Unfortunately, I bought a Samsung printer. Exactly, I could print ONE page. Then the printer is asleep and could not be woken up again. In "printers and scanners" he showed "offline". It is connected through my wireless network. When I hit print, the

  • HP Pro 3000 MT - Win 8 - PCI simple Communications Controller driver?

    Hi all, I tried all-manual and auto install only Win 8 LAN driver on the HP site. nothing works on Win 8 to solve the problem of this unknown device: "Pilot Communications simple controller PCI" Build 9200 Win 8 Pro 32-Bit Any ideas? Thank you Ralph

  • Compaq nx6325 Finger Print Reader

    I have a Compaq nx6325 running Windows Vista Business 32-bit and I was trying to get the AuthenTec Inc. AES2501A fingerpint drive to work. I installed the minimum installation of the HP driver page and I was wondering how I could then open a session

  • Update for Windows 7 Windows

    Hello Our laptop is not be allowed to download updates for Windows 7. Checking for updates... and this continues for hours. I started the thread and any time of the day and still the same Just tried to 01:30 and always the same. He has an i3 processo

  • Help of blackBerry Smartphones that I have unlocked my BB now problems

    I have unlocked my BB with a code that I got tmobile because im going overseas and now I can not lock my keyboard and also my battery is dying faster even if im not to use my phone at all... just need to know if that has something to do with the code