Changing the values in drop-down list in the event not return current value

Hello

I have a combo that I'm filling using javascript according to the post by Brad here http://blogs.4Point.com/Brad.White/2010/03/populate-a-drop-down-with-a-Web-service-in-a-PD e.html .

I hooked the change event from the drop-down menu to display the new selection in a separate as text box below

ApplicationForm.Page1.ddlUsers::change - (FormCalc, client)

txtSelected.rawValue = ddlUsers.rawValue

This code works, but shows the previous values (or the last) that has been selected in the drop-down list, but not the current value, which has been selected by the user. I also tried to use selectedIndex rather rawValue on ddlUsers but it has the same behavior. "Commit on" from the drop-down list is set to "SELECT".

Am I missing something here? How can I get the current value is selected in the drop-down list.

Thank you

Marie Pascale

Hi Carole,

I didn't look at the blog, but the most appropriate property for use with the change event is xfa.event.newText instead of .rawValue.

Thus, as the Javascript:

txtSelected.rawValue = xfa.event.newText;

Hope that helps,

Niall

Tags: Adobe LiveCycle

Similar Questions

  • selecting a value in the drop-down list but page must not get recharged again.

    Hello
    I created a drop-down list. After you have selected a value from him, I can get a value in the box of text below according to updon one sql query. but the problem is that I HAV to select Page Action when the changed value parameter to the set value and redirect. Thanks to her whenever I have to select a value from the drop-down list, page get updated. Is there a way that will satisfy the requirement but page does not get new dependants.
    I use apex 4.2.
    Thank you

    You can create A dynamic Action to set the value while changing the value in the Select list (drop-down list).

    Event: change
    Selection type: item (s)
    Article (s): choose your selection list item
    Action: Execute the PL/SQL Code
    PL/SQL code:

    begin
    select colum_name into :Px_text_item_name from table where column_name=:px_select_list_name;
    end;
    

    Page elements to send: px_select_list_name
    Page referred to return: Px_text_item_name

    Its work for me without refreshing the page. Assume that, if you want to pass this value to the element in another page, then use the branch for redirection and assign the value to the element on the page of another.

    Thank you
    Lacombe

  • Drop-down list options, even if not selected

    Hello

    I'm doing a printable form for our workers to complete tasks and others to work.  In the options field, I have a drop down containing a list of options for them to choose from.  My problem is that, regardless of whether if this conduct is used, it will always show the first thing in the field.


    I would like to print only when something in the drop-down list is selected.  Is this possible?

    Something is always selected in a menu drop-down... The default value, which is

    the first condition in the list.

    If you want to do unprintable fields when the default value is

    You must use a script that hides them before the selected document

    is printed and shows their return again later.

    Tuesday, April 28, 2015 06:38, kushlar47760666 [email protected]>

  • Change the border color of text field based on a value from the drop-down list

    I have a dropdown menu with 4 choices of priority for maintenance.  With a javascript script, I need to be able to select a 'priority' in a list box and a text box border then color with an appropriate color.

    'High priority' with an export value of 0

    "Medium priority" with a value of exports of 1

    'Low priority' of an export value of 2

    "When the time allowed" with a value of exports of 3

    When one of these selections has been filed, a text box becomes available in order to write the gap. My goal is as follows.

    When "High priority" is selected, the border of the text box where you write the gap would blush.

    When "Moderately urgent" is checked, the border around the text box where you write the gap would turn yellow.

    When "Low Priority" is checked, the border of the text box where you write the gap would become green.

    When "when she allows" is checked, the border around the text box where you write the gap would have turned blue.

    Otherwise, the border would be white.

    This form will be used ultimately on an iPad using Expert PDF under the player.     I use Acrobat X to create the form.

    Any help would be appreciated.

    Yes, I accidentally left a hug. I can fix it so it won't be a problem if someone tries to use it. Happy that you guessed it work.

    To handle resetting, you can use a script to validate drop-down list:

    Script to Validate drop-down list

    If (event.value = "" "") {}

    getField("discrepancy_1").strokeColor = color.white;

    }

  • Populate drop-down list with the results of several drop-down lists

    Hi, I am creating a form where the results of two drop-down lists then would fill another drop-down list. I'm not new to javascript, but I'm new to using it in Acrobat, so while I found some answers to this: Drop-down list fill in multiple fields of text. I don't know where to implement this, if it is still the right thing, I'm looking for pipes for

    Oh and I use Acrobat Pro DC. Any help would be much appreciated!

    OK, you can create a function at the level of the document that is called in the Validate event of each of the two first drop down menus, something like:

    Function in JavaScript to the document level

    function updateDropdown() {}

    Get references to the drop-down menus of entry

    var F1 = getField ("DropdownList1");

    var F2 = getField ("DropdownList2");

    Refer to the output drop-down list

    F3 var = getField ("DropdownList3");

    Get the values of input field, as strings

    var s1 = event.target = f1? Event.value: f1.valueAsString;

    var s2 = event.target = f2? Event.value: f2.valueAsString;

    Fill the drop-down list of output with the elements, or deselect it if either input dropdown is 'empty' (single topic area)

    If (s1 = "" |) s2 === " ") {

    F3.clearItems ();

    } else {}

    F3.setItems (["", s1, s2]);

    }

    }

    In the two first downs Validate event, call this function like this:

    updateDropdown();

    You can of course name the function you want. More information about the properties and the methods used in the code are available in the Acrobat JavaScript documentation.

  • Drop-down list with values outside field

    I tried to find how to feed external values to a field of ASD form drop-down list. It is not clear how we can link/partner an external source to the field.

    There is an article on how to regularly fill with external values, but I'm after a search in real time (for example find meeting locations available)

    Is this the values supported real-time search? If so, how can it be done?

    Check this post where his clearly explained how to create action and associate it with the presentation.

    Re: Decision tree for user input

  • How to use the drop-down list box to fill in a text box

    I'm a beginner when it comes to Java Script.  I have seen a lot of different discussions, look at a lot of articles "helping" Acrobat 9 and Java Script, but only to be left confused and dazed.  I hope someone can tell me how to write a script that fills a text box that sits on my form with the value of exports of the selection in the combo box...

    Thank you

    If you want that the read-only text box, simply set with the following custom calculate script:

    Set this field to the value of the drop-down list box

    Event.Value = getField("combo1").value;

    but replace "combo1' with the actual name of the combo box field.

    If you want something else, post again with more information.

  • Drop-down list does not appear selected value

    Hello

    I have a problem. The output of a query results page. There are 2 fields must be updated: scholarshipID and amount. I want to update my request at a time. My dynamic drop-down list does not appear selected value. The value is there, but it does not recognize in the drop-down list. I could not find the error. My code is below, so please help...

    < name cfquery = "getStudentsData" datasource = "#application. DSN #">"
    Select StudentID, fname, lname, GPA, Tbl_Students.ID, ScholarshipID, rise, Tbl_StudentsScholar.ID as the SSID, AwardStatus
    of Tbl_Students, Tbl_ApplyYear, Tbl_EduBckgrnd, Tbl_StudentsScholar
    where Tbl_Students.ApplyYr = Tbl_ApplyYear.id
    and Tbl_Students.id = Tbl_EduBckgrnd.SID
    and Tbl_Students.ID = Tbl_StudentsScholar.SID
    and ApplyYear = 1
    and steps = 7
    order by studentid
    < / cfquery >

    < name cfquery = "getScholarship" datasource = "#application. DSN #">"
    Select AcctNum, scholarship, Tbl_Scholarships.id, Code
    of Tbl_Scholarships, Tbl_DistCode
    where Tbl_Scholarships.DistCode = Tbl_DistCode.id
    AcctNum order
    < / cfquery >

    < cfparam name = 'X' default '0' = >
    < cfparam name = default "CounterX" = "0" >

    <!--get scholarship-->

    < cfif getStudentsDataRet.RecordCount eq 0 >
    < class p 'paragraph' = > No Records Found < /p >
    < class p = "pageheight" > < / p >
    < class p = "pageheight" > < / p >
    < cfelse >


    < class p = "submitmessage" > records found - < cfoutput > #getStudentsDataRet.Recordcount # < / cfoutput > < / p >
    < table width = "98%" border = "1" cellpadding = "3" cellspacing = "0" style = "" border-collapse: collapse "bordercolor ="#000000"align ="center">"
    < class tr = "steptext2" bgcolor = "#999999" align = "center" >
    < td width = "10%" > Student ID < table >
    < td width = "9%" > name < table >
    < td width = "9%" > name < table >
    < td width = "5%" > GPA Cum < table >
    < td width = "5%" > account # < table >
    < td width = "5%" > < table > amount
    < td width = "20%" > account # | Dist Code | Scholarship name < table >
    < /tr >

    < do action = "updateAward.cfm" method = "post" name = "AwardForm" > "
    < cfoutput query = "getStudentsDataRet" >
    < cfif eq x 0 and x neq getStudentsDataRet.recordcount >
    < cfset x = 1 >
    < cfelseif x neq (getStudentsDataRet.recordcount + 1) >
    < cfset x = x + 1 >
    < / cfif >
    < class = "paragraph" tr >
    < td > #StudentID # < table >
    < td > #lname # < table >
    < td > #fname # < table >
    < td > #GPA # < table >


    < cfif AwardStatus eq 2 >
    < name cfquery = "getStudentsScholar" datasource = "#application. DSN #">"
    Select Code, Tbl_Scholarships.id, AcctNum, scholarships
    of Tbl_Scholarships, Tbl_DistCode
    where Tbl_Scholarships.DistCode = Tbl_DistCode.id
    and Tbl_Scholarships.ID = #getStudentsDataRet.ScholarshipID #.
    < / cfquery >
    < / cfif >
    < td >
    < select name = "" scholarshipID_ #X # "onChange =" showMessage_ #X #(this.options[this.selectedIndex].value) ">"
    < option value = "" > < / option >
    < cfloop query = "getScholarshipRet" >
    < option value = "" #id # "selected < cfif getStudentsDataRet.ScholarshipID eq id > < / cfif > > #AcctNum # < / option >"
    < / cfloop >
    < / select >
    < table >
    < td > < input name = "" amount_ #X # "type ="text"size ="5"< cfif amount gt 0 > value = ' #NumberFormat (amount, 99.99) # ' < / cfif > / > < table >"
    < td > < cfif AwardStatus eq 2 > #getStudentsScholar.AcctNum # | #getStudentsScholar.Code # | #getStudentsScholar.Scholarship # | #getStudentsDataRet.ScholarshipID # < / cfif > < table >
    "< input name =" "IndexID_ #x #" type = "hidden" value = "#SSID #" / >
    < /tr >
    < / cfoutput >
    < cfoutput > < input name = "CounterX" type = "hidden" value = "" #getStudentsDataRet.RecordCount # "/ > < / cfoutput >"
    < b >
    < td align = "center" colspan = "11" height = "50" valign = "middle" > < input name = "Submit" type = "submit" value = "Submit" / > < table >
    < /tr >
    < / make >
    < /table >
    < / cfif >

    the syntax is: getStudentsDataRet.ScholarshipID [1]

    where '1' is the line number to specify

  • Why don't point in the drop-down list address not remove when selected and click on remove

    on version 14.1 - to remove an item in the drop-down address, said the point the address line the right click and select delete - this clears the address line but point remains in the drop-down list and does disappear not - why point unclear when you return to fall down to check this

    the system is XP and ff 14.1

    I think that you need for the arrow down to the element, so it is highlighted, and then press DELETE.

    (I meant the keyboard delete key, you can't right click on the drop-down list).

  • Drop-down list in the Organizer 12 elements is missing

    I have a MAC and an organizer of 12 elements.  At the end of the day, I'm trying to understand how to delete folders in the dock of the Organizer.  However, when I select the folder, there is no drop-down list.  I do not see a trash icon and nothing in the toolbar very short above offers any apparent option.

    I don't know what the Mac equivalent of a way to 'right click' windows or how it works.  But again, all I'm trying to accomplish is the removal of specific folders of in the dock of the Organizer.

    Any help would be appreciated!

    Thanks, Denny

    robinc79522696 wrote:

    Thank you very much for this.  When I executed this manoeuvre, the drop down menu seemed however the option 'remove' was black and would not let me run the deletion.

    This option should not be "grayed out". It's only for me, if I select a drive name.

    I don't know other Mac users will tell us if there is something special with the Mac.

  • Several drop-down lists with the same content

    Hello my friends, I have several drop-down lists that are the same in content, I've added them all to each list drop-down I (30 PC), but now the size of the file becomes too large, so I was wondering is it possible to make only 1 from the list and use it in all my dropdowns?

    Specify: the list is only-text strings, nothing more. And the list should also be inside the shape (no external database)

    Help much appreciated, thanks: =)

    Alrighty then. The forum let me download files right now, so here's what to do using your example:

    1. In the hierarchy of the shape, right-click on the object 'form1' and select 'insert a Script object"in the menu.
    2. Rename the new object of script to 'Scripts '.
    3. Paste the following code in the Scripts object (it will not be an event to select):

    var ProductArray = new Array)

    "Product1 | 0127481 | 4 pcs | 1. 27,10 ",

    "Leader2 | 0127482 | 5 parts | 2. 28,20 ",

    "Product3 | 0127483 | 6 pcs | 3. 29,30 "

    );

    function PopulateProductDropdown (ddlList)

    {

    var numProducts = ProductArray.length;

    for (cnt var = 0; cnt)< numproducts;="" cnt++="">

    {

    ddlList.addItem (ProductArray [cnt]);

    }

    }

    4. in each of the drop-down list object Initialize event, paste the following code:

    Form1.variables.scripts.PopulateProductDropdown this);

    That's all.  You won't need to add list items to each of the drop-down list object, and you can remove those who came to see the first drop-down list.  Add all new products at ProductArray, by following the syntax of those here.  Make sure that you don't have a comma after the last one in the table.

  • Related question drop-down list help

    In my dropdown menu, I have several different time zones and they are all related number of UTC offset. The problem is that when I click on a zone (for example Russia), he returned to the zone which precedes it in alphabetical order with the same offset from UTC. This is problematic because many different countries sharing the same UTC offset (that is-14-14).

    I wonder if there is a way to stop the drop-down menu to change automatically in a different time zone that has the same offset or if there is a way to get into the drop-down list and add all variable offsets.

    I'm new to JS if possible sentence there for a beginner. I never used before livecycle but know C++ and Java, and will have a hard time setting. With all the resources out there, it is difficult to find a good place to get a Uni livecycle background so if anyone has recommendations on the reference material so I would be interested in this good.


    Thank you.

    Hello

    The problem is that the bound value represents the value of the object, so that it always displays the first item in the display which corresponds to the bound value.

    We know by one of the LC Designer, setItems(), methods that Adobe will at some point in the future allow us to link several values in a drop-down list object. However for now you cannot have a single value given.

    But there is always a workaround solution. If you set values the display of elements to include the country. Thus, for example for a display item «Russia», the bound value would be "Russia,-14 a 14.

    It is a unique value in the drop-down list, so it will not solve the current problem.

    The last step would be to analyze parts of the bound value, so that you get the offset of UTC, which you can then use in your script.

    There is an example here: http://assure.ly/HjRnIN.

    Hope that helps,

    Niall

  • How can I create a drop-down list in Dreamweaver CC 2015?

    I've already implemented the site essentially, but one of the points on my navigation bar should be changed to make a drop-down list. Any help would be very appreciated! Thank you very much!

    (It is my first time using DW or any other similar software, so please respond to a beginner level!) Thanks again!

    A menu is a navigation bar. See if that helps you.  The drop occurs on the link products.

    Horizontal centered bootstrap tablets - http://alt-web.com/

  • MultiSelect - drop-down list

    Hello

    is it possible to use the selection type multiple select/drop down list?
    I have not seen this option in the APEX so far.
    No alternative workaround to use the 'Checkbox '?

    Thank you!

    BR
    Lena

    Hi Lena,.

    just use the element type 'Select list' and 'Allow Multi selection' value = yes and "Height" for example at 10. That should do it.

    Concerning
    Patrick
    -----------
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins

  • Drop-down list "Strong Predictor treatment" ODMr

    Hello

    When you use ODMr GUI to configure a regression of GLM, I face a strange behavior when trying to use the 'Selection' to determine the predictors.

    In the window 'Option dialog box function Selection', whenever I choose "Add All at Once" in the drop-down list "Strong Predictor treatment", it returns automatically to the determined '<>system' (which in my case translate 'Add one at a time') as soon as I leave the window.

    Is there a reason for this or is this a bug?


    On the other hand, the CLI, it works fine when I specify DBMS_DATA_MINING.glms_select_block_enable!

    Thank you!

    Raphaël

    Hi Raphael,.

    It is a bug.

    It will be corrected in a future release.

    Thank you

    Marat

Maybe you are looking for