In cascade LOV - Dynamic action time-out

See https://apex.oracle.com/pls/apex/f?p=57688:32

X 1 selection list is set 1,2,3

X 2 a parent selection list cascading as X 1 and ajoute.1/.2/.3 to X 1

There is a change DA on the text field to set the 2 selection lists to the value set in the text field. For example, if I set the text field to the 1.2 version, I want X 1 to 1.2 to 1 and X 2. There are therefore 2 actions to set the value; first of all to define X 1 and secondly to set X 2.

The problem is that when X 1 is set, the change event on X 1 fires and refreshes the LOV for X 2 and the 2nd real action should fire after the LOV refresh but (probably), it fires too early and not ends not change the value of X 2, so it remains empty. I tried assigning no on the first real action to remove a change event, but that will not work because I need the modification to the fire action when X 1 changes to the LOV to X 2 can be updated.

The annoying thing about this is that it works sometimes (X 2 is set correctly) and sometimes does not (X 2 remains empty). I guess it depends on timing of millisecond level between when X 2 refresh is complete and the 2nd shot of real action.

What this kind of thing done? Almost need a sleep/delay after the first action to set the value so that the change/refresh LOV event to take place and then run the action to set the value to 2. But the presentation with the help of setTimeout and similar delays can ruin the execution has / synchronous Javascript engine and crash the browser so I am reluctant to go this route...

Help? Thank you

Select cascading lists work correctly with the principle of cooling they are triggered in the front and after the events of refreshment. You can link to this event, and then set the value.

Your first action is a defined value which is synchronous and triggers a change event.

Here is a pure js to take on this:

$("#P32_X1").on("change", function(){
  // do something when X1 is changed
  console.log("change x1");
  //wait for X2 to finish refreshing before setting its value
  //.one() will bind a handler which will unbind after it hass handled once
  $("#P32_X2").one("apexafterrefresh",function(){
    apex.item("P32_X2").setValue("1.1");
  });
});

//when text changes and set a value on X1
//setValue already fires a change event
$("#P32_TEXT").change(function(){
  apex.item("P32_X1").setValue("1");
  .change();
});

To do this in your DA, you bind the time Manager to the second list before leaving the event which it will update. I would not put it in a DA on X 1 because this event of change may occur when it is too late already (may, may not - asynchronism), simply because there is already a change on it due to cascading select lists event handler. So ideally, before you trigger the change on X 1 event and, therefore, during the change of Manager of the TEXT.

$("#P32_X2").one("apexafterrefresh",function(){
  apex.item("P32_X2").setValue("1.1");
});

You will need to define what is set as the value of X 2 of course, that you have given, I can't tell what it is, so I've hardcoded value (and FYI my value will work only if X 1 made 1, of course, because only then be X 2 hold 1.1).

Some links to docs:

http://API.jQuery.com/one/

JavaScript aPIs: apex.item (NDP) .setValue)

Tags: Database

Similar Questions

  • Dynamic action: apexafterrefresh not firing

    See https://apex.oracle.com/pls/apex/f?p=57688:32

    See the discussion on Cascading LOV - dynamic action time-out

    I extended this approach to a report and another list cascading and things do not work as expected. Here are the components

    1. the list of values for X 1 is 1,2,3

    2. the list of values for X 2 is X1.1/.2/.3, cascade parent's X 1

    3. the list of values for X 3 is X 1. X 2, cascade of parents are X 1 and X 2

    WHAT SQL statement is

    with 
     l1 as (select level l from dual connect by level<=3),
     l2 as (select level l from dual connect by level<=3)
    select
     l1.l l1,
     l1.l||'.'||l2.l l2,
     l1.l||'.'||l1.l||'.'||l2.l l3,
     null link
    from l1,l2
    order by l1.l,l2.l
    

    "Link target page attributes column and the current link class = 'find' x: l1 =" "#L1 #" x: l2 = "#L2 #" x: l3 = "" #L3 # " "

    Dynamic action D1 is on fire on jQuery selector a.search with the following real click

    1 setpoint: Javascript expression $(this.triggeringElement).attr("x:l1"). Affected item: P3_X1. Remove the change event: no

    2. run Javascript code:

    $("#P3_X3").one("apexafterrefresh",function () {
      $s("P3_X3",$(this.triggeringElement).attr("x:l3"));
    });
    

    3 setpoint: Javascript expression $(this.triggeringElement).attr("x:l2"). Affected item: P3_X2. Remove the change event: no

    4 cancel the event

    In my real example, there are reports configured to refresh when X 3 changes and that part works when I change X 3 manually. I'm just unable to set X 3 with these series of dynamic action of shooting.

    Here's what I expect to happen

    1. true action 1: this sets X 1, which is updated X 2

    2. true action 2: This defines a unique event set on fire after the update to set its value X 3

    3. true action 3: this sets X 2 and updates X 3.

    This is supposed to raise the apexafterrefresh event and set the value from X 3 to x: l3, but it remains empty.

    What Miss me? I tried all sorts of things as defining the change event to delete Yes and triggering events manually. change(), change the order of actions, but nothing works. I just can't do the value of X 3 when the dust settles.

    Help? Thank you

    Hello

    had a look at your 57688:32 and copied on app # 19453 playing around.

    1. P32_X3 must only specify P32_X2 as 'Cascading LOV Parent article (s)' otherwise it will refresh when P32_X2 is changed and when P32_X1 is changed. But P32_X1 will trigger a change in P32_X2 anyway (which causes a refresh of P32_X3). I changed P32_X3 and to P32_X1 'Elements of Page to submit' in order to access the value of the LOV.
    2. You code referenced JavaScript P3_... instead of P32_... I changed to P32_...
    3. I also changed the order of the actions in your dynamic action
      1. First register your handler "apexafterrefresh" otherwise you can run into problems of synchronization
      2. Removed your action 'Set value' for P32_X2. See below.
      3. I also created a "apexafterrefresh" for P32_X2, because the definition of P32_X1 clears the value of P32_X2 and you must wait for the update cascading
      4. I also changed the JS code to use the variable auto instead of this, because within the apexafterrefresh, this will point to your agenda of the page list selection and not to the original report column.
    var self = this;
    $("#P32_X2").one("apexafterrefresh",function () {
    console.log(this, self);
    $s("P32_X2",$(self.triggeringElement).attr("x:l2"));
    });
    
    $("#P32_X3").one("apexafterrefresh",function () {
    console.log(this, self);
    $s("P32_X3",$(self.triggeringElement).attr("x:l3"));
    });
    

    Hope that gives you a direction to fix it in your application.

    Concerning

    Patrick

    Member of the APEX development team

  • Time-out settings

    Is it possible to dynamically access time out (eg. Web object functional timeout)? If so, how can I change?

    The reason why I want to do it is because now, if a script is running on multiple computers, the timeout parameter must be changed for each machine in Openscript preferences.
    I prefer my script to change the timeout value according to the task at hand.


    Thank you
    Narayan

    To print all the settings in the tab console during execution:
    System.out.Print (getSettings ())

    To set a particular parameter:
    getSettings () .set (setting_name, setting_value);

    The one that you probably want to define:
    Web.event_time_out = 60

    So it should be:
    System.out.Print (getSettings ());
    getSettings (.set("web.event_time_out",19));
    System.out.Print (getSettings ());

    JB

  • In cascade LOV and calling a javascript function thro dynamic action

    We have a page where there are lovs cascaded to the country / state. The selection of State list is cascaded with country LOV. We also request a javascript to normalize the child lov (State), so that if there is no value in the list, the lov will be disabled and if there is only one value for show, which will be set as default (enabled). However, it seems apex runs javascript code standardize everything first and then generates the list for the lov State, then the State lov is always disabled.

    I created a page similar to apex.oracle.com with choice of Department lists and employee. The link to the page is http://apex.oracle.com/pls/apex/f?p=40631:2

    In this page, the employee selection list is cascaded to the Department. (1) to any value other then 'IT' or no selection value in the list of DEPARTMENTS, the list of employees must be enabled and should list all the names of appropriate employees. (2) for the selection of the 'IT', it should be disabled with the default selection as "no data found". However it does not for 1). Could someone find the problem and give a possible solution.

    Javascript code executed (that thro NatStandardizeLOV1('P2_EMPLOYEE') dynamic action for Department change is lower.

    < code >
    function NatStandardizeLOV1 (pitem)
    {
    var obj = document.getElementById (pitem);
    obj. Disabled = false;
    obj.options [0]. Text = "SΘlectionner one..";


    If (obj.type is "select one")
    {

    If (obj.length == 1 & & (obj.options [0] .value == ": obj.options [0] .value == null))
    {
    obj.options [0]. Text = "No. Data."
    obj.disabled = true;
    }
    If (obj.length == 2 & & (obj.options [0] .value == ": obj.options [0] .value == null))
    obj.options [1]. Selected = true;
    }
    }


    < code >

    Thank you in advance,

    Natarajan

    Published by: Nikita on May 27, 2011 04:21

    Natarajan,

    The question is one of the time. You're service is running before the Ajax request (triggered by the LOV cascading) brings back the items. So change the 'when' of dynamic Action so that it fires the event "After Refresh" of the question of the Department rather than the event change.

    Kind regards
    Dan

    blog: http://danielmcghan.us/
    work: http://SkillBuilders.com/APEX/

  • Is it possible to change the definition of LOV uses dynamic action?

    Hello

    I have a multiple selection LOV page article, P27_MULTI_CLASS_CODE, defined as below.  The loading of the page, this list contains only values based on what was passed to P27_OLO_CODE or P27_OLO_CODE_SW.

    SELECT DISTINCT c.class_code d, c.class_code r

    O ORGANIZATION,

    POSITION p,

    CLASS c

    WHERE o.org_wk = p.org_wk

    AND p.class_wk = c.class_wk

    AND o.org_active_flag = 'Y '.

    AND p.pos_active_flag = 'Y '.

    AND c.class_active_flag = 'Y '.

    AND (o.olo_code =: P27_OLO_CODE)

    GOLD o.olo_code =: P27_OLO_CODE_SW)

    ORDER BY c.class_code ASC

    Before submitting the page, I want the definition of LOV's P27_MULTI_CLASS_CODE to change the following (similar application without reference to the P27_OLO_CODE or P27_OLO_CODE_SW) based on the question if the user selects a checkbox, P27_ALLOW_SW.   In doing so, P27_MULTI_CLASS_CODE would contain a wide range of values, rather than the limited values.

    SELECT DISTINCT c.class_code d, c.class_code r

    O ORGANIZATION,

    POSITION p,

    CLASS c

    WHERE o.org_wk = p.org_wk

    AND p.class_wk = c.class_wk

    AND o.org_active_flag = 'Y '.

    AND p.pos_active_flag = 'Y '.

    AND c.class_active_flag = 'Y '.

    ORDER BY c.class_code ASC

    I wanted to avoid writing Javascript.  Is this possible using dynamic measurements... or at least somehow update P27_MULTI_CLASS_CODE so that it ignores the P27_OLO_CODE and the P27_OLO_CODE_SW?

    Tried to create dynamic action to clear the value of P27_OLO_CODE or P27_OLO_CODE_SW, in the hope this would trigger P27_MULTI_CLASS_CODE to display all the values, but it has failed.  Any ideas?

    APEX 4.2

    You can do this by editing the query lov a little:

    SELECT DISTINCT c.class_code d, c.class_code r
      FROM ORGANIZATION o,
           POSITION p,
           CLASS c
    WHERE o.org_wk = p.org_wk
       AND p.class_wk = c.class_wk
       AND o.org_active_flag = 'Y'
       AND p.pos_active_flag = 'Y'
       AND c.class_active_flag = 'Y'
       AND ((:P27_ALLOW_SW = 'Y' AND (o.olo_code = :P27_OLO_CODE OR o.olo_code = :P27_OLO_CODE_SW))
            OR :P27_ALLOW_SW = 'N')
    ORDER BY c.class_code ASC
    

    (of course, use the correct value for P27_ALLOW_SW)

    The "cascade LOV Parent article (s)" value P27_ALLOW_SW and also add "Page elements to submit" element (Note: this item appears only when you have entered a value in the element of parent lov cascading items)

    Now, after changing P27_ALLOW_SW the lov will update to P27_MULTI_CLASS_CODE.

  • ORA-10173: time-out of dynamic sampling error: application of OBIEE 11 g

    Hello

    Application: OBIEE 11g

    Database: Oracle Database Enterprise Edition Release 12.1.0.2.0 - 64 bit Production 12 c

    The following alert was generated for the purposes of OBIEE 11 g database.


    ORA-10173: time-out of dynamic sampling error:


    When I google it finds that there is no resolution except that raise to Oracle.


    Anyone experienced the same and any resulting resolution already?


    Enjoy the you entries.


    Thank you

    HESH

    Thanks Christian, I'll close this thread and open a new forum of the database.

  • dynamic action and LOVs

    Hello

    I'm having some trouble with the values defined in LOVs areas. I created a free workspace in Oracle APEX.

    I created a form with two fields of LOVs, EMP and DEPT, after that I created a dynamic action to set the value on the LOV Dept field. Then always when a new EMP is selected, the LOV Dept field must define the departament of the chosen MAP.

    Dynamic action has not worked with LOVs fields, always when I changed the field EMP LOV LOV DEPT field is canceled, but when I changed the DEPT LOV to SELECT LIST field, it's good work.

    dynamic action properties:

    event: change; *
    Select type: points; *
    point: EMP_LOV*.
    Condition: no condition; *
    Action: value; +
    setType: Sql statement+.
    Sql statement:+.

    Select DEPTNO+.
    from EMP+.
    where EMP. EMPNO =: EMP_LOV+.

    Assigned items: DEPT_LOV+.

    Brgds,
    André.

    Edited by: 969316 11/03/2012 07:36

    Edited by: 969316 11/03/2012 07:36

    Try sth like this:

    First create a hidden item, let's call it P1_DEPTHIDDEN then

    Create dynamic action:

        Event: Change
        Selection Type: Item
        Item: P1_EMPLOYEE
    

    Now for the first real action follow these steps:

        Action: Execute PL/SQL Code
    
        BEGIN
    
            SELECT DEPTNO INTO :P1_DEPARTMENT FROM EMP WHERE EMPNO = :P1_EMPLOYEE;
    
        END;
    
        Page Items to Submit: P1_EMPLOYEE
        Page Items to Return: P1_DEPARTMENT_HIDDEN -- This is return value, the value you will store in your database table (not the one you see on the screen)
    

    Now for the second True action follow these steps:

        Action: Execute PL/SQL Code
    
        BEGIN
    
            SELECT DNAME INTO :P1_DEPTHIDDEN FROM DEPT, EMP WHERE DEPT.DEPTNO = EMP.DEPTNO AND EMPNO = :P1_EMPLOYEE;
    
        END;
    
        Page Items to Submit: P1_EMPLOYEE
        Page Items to Return: P1_DEPTHIDDEN -- This is display value, the value you actually need to see in P1_DEPARTMENT item !
    

    Now for the third True action follow these steps:

        Action: Execute JavaScript Code
    
        $x('P1_DEPARTMENT').value = $x('P1_DEPTHIDDEN').value /* Now you set P1_DEPARTMENT value to be exactly what you need */
    

    I really hope that it works, it's probably more easy solution then this one.

    Mimi

  • Use page LOV which has been defined by a dynamic action

    Greetings,

    I have a situation where I need to refer to an item hidden in a SQL statement from the list of values (for a drop-down list). It doesn't seem to work properly. Here's what I have:

    (1) using a dynamic action, the value of a hidden element, based on the change of select list 1.

    (2) select list 2 has a parent element LOV to select list 1 and the Select statement to select list 2 uses the hidden element that has been defined in the dynamic action above.

    I see that the dynamic action works properly. But when I change to select list 1, list 2 Select shows not all values in the LOV.

    I hope this makes sense. I wonder if the LOV to select list 2 does not work because the element used in the SQL statement has been defined by a dynamic action?

    Thanks in advance!

    John

    Since you use a sql query to retrieve a single value, is it necessary to have this value in a field hidden somewhere?
    Could you not change the query for you select second list to limit its results by integrating this query in lov query, for example through an is clause?

  • Dynamic action - show/hide area based on LOV that returns the ID

    Hi people,

    This should be simple, so someone who works with dynamic actions.

    I have a LOV based on query below:
    select OBJECT_ID, KOD 
      from x_data x;
    
    retuns:
       ID          KOD
    ----------------------------
        492961 BMW
        492964 VOLVO
        492960 MERCEDES
        492963 VOLKSWAGEN
        492959 SKODA
    Agenda: P200_KOD is based on LOV that displays KOD and returns the ID.

    On my page, I have also 1 region called TEST_REGION.

    I want to put in place a testament of shich dynamic action SHOW/HIDE a TEST_REGION based on the value selected in the order of the day: P200_KOD (LOV). Region should be shown if displayed (KOD) selected ID value begins with '% V '.
    By other words, if following query returns any folder, then the SHOW, HIDE it on the other:
       select *
        from x_data x
      where x.kod like 'V%'
         and x.object_id = :P200_KOD;
    How can I define a condition of dynamic action fires, for article: P200_KOD?

    Thank you
    Tomas

    Hello

    One way:

    Create an advanced dynamic action.
    Name: Region to hide
    Event: change
    Selection type: item (s)
    Items (s): P200_KOD
    Condition: Expression of JavaScript
    Value:

    $(this.triggeringElement).children("option:selected").html().substring(0,1) !== "V"
    

    Action: hide
    Fire on the Page loading: true
    Hide all items on the page on the same line: No.
    Action of false: show
    Fire on the Page loading: true
    Display all items in the page on the same line: No.
    Selection type: region
    Region: TEST_REGION

    Kind regards
    Jari

    http://dbswh.webhop.NET/dbswh/f?p=blog:Home:0

  • Dynamic action - Get the difference between two dates + times

    I have problems a little dynamic to work action. I'm trying to get the time between two dates with the time difference.

    Here is what I got (this is apex 4.0):

    Two date pickers + two numbers fields (date/start/end times)

    I created a dynamic action on the page who fires on the point lose focus (above points).

    The real action for the DA is the body of the PL/SQL function:
    declare
      end_date DATE;
      start_date DATE;
    Begin
      start_date := to_char(:P1_START_DATE || ' ' || :P1_START_TIME, 'DD-MON-YYYY HH:MIAM');
      end_date := to_char(:P1_END_DATE || ' ' || :P1_END_TIME, 'DD-MON-YYYY HH:MIAM');
      :P1_HOURS := end_date-start_date;
    End;
    When I change the values on the page, I get the following error:

    AJAX call back Server error ORA-06502: PL/SQL: digital or value error: character number conversion error to set the value.

    I'm guessing that there is a problem with the date formatting, but I can't make it work. Thanks in advance!

    Hi djston,

    because you chose the dynamic action of 'Set value' with the "Body of the PL/SQL function" type you need to return the value. Try the following code

    declare
      end_date DATE;
      start_date DATE;
    Begin
      start_date := to_date(:P1_START_DATE || ' ' || :P1_START_TIME, 'DD-MM-YYYY HH:MIAM');
      end_date := to_date(:P1_END_DATE || ' ' || :P1_END_TIME, 'DD-MM-YYYY HH:MIAM');
      RETURN (end_date-start_date)*24;
    End;
    

    and P1_REQUESTED_HOURS like 'item affected. "

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

    Published by: Patrick Wolf on January 17, 2011 10:54

  • Dynamic action not updated report every time

    Hi guys,.

    I have a page which downloads statspack reports from different servers and stores them in the APEX. As well as this, it also displays a summary of the data (top 5 events of wait & load profile info) where flat an icon: http://oi40.tinypic.com/295uxxg.jpg

    The table will refresh and display the data according to the value of P10_SNAPVAL (storage of the PK value).

    It is not that I expect to do the report (it is not updating the table). I have the following:

    Area PL/SQL dynamic content making the report

    Dynamic action

    -Event: change

    -Item: P10_SNAPVAL

    -Action: update

    -Element affected: Region - load (dynamic PL/SQL content) profile

    -Field of application event: I tried as well bind & live

    The value of P10_SNAPVAL is changed whenever the user place an icon of Penguin (this works because the graphic works).

    Anyone know why my current setup does not work with the table/how fix?

    Edit: It's something to do with me changing using javascript?

    $('img[name=summary]').mouseover(function() {
    var get = new htmldb_Get(null,html_GetElement('pFlowId').value, null,10);
    get.add('P10_SNAPVAL',$(this)[0].id.substring(3));
    var gReturn = get.get();
    document.getElementById('P10_SNAPVAL').value = gReturn;
    $("#c9485413559485976").show();
    $("#loadtab").show();
    });
    
    
    

    Edit 2: I tried:

    jQuery('#apexir_WORKSHEET_REGION').trigger('apexrefresh');
    

    and each apexir_WORKSHEET_REGION down id (apexir_REPORT, apexir_WORKSHEET, apexir_DATA_PANEL, 9587216508806437) but it is not updated the table of values for any of them. I thought that this call was made for normal day and reports of the IR, but I tried normal, he passed to IR and it is not refreshing. No errors in JS (according to firebug)

    On page 2, I changed:

    report area model was "no model", changed to "borderless region" - there must be a model.

    and changed the static ID of the area to "report_updrep" - because in javascript, we use this ID.

    Look, it works.

  • Shuttle with cascade LOV and pre-populating on the right side

    Good afternoon

    In my form, I have a piece of text to a certain number of tickets, a drop-down list for a site and a shuttle service to the employees of the site.  If I select a site in the drop-down list, the shuttle refreshes and I can choose employees.

    Here's the wrinkle, if I get a ticket number, it triggers a dynamic action to pick up the site and all selected employees.  I checked the values returned and the dynamic action works as expected.  When the site is updated, the shuttle refreshes, but the selected employees are not load in the right side of the shuttle.

    I tried to divide the dynamic action of the number of the ticket into two pieces: one to select the site and the other to select the selected employees.  In the hope that the dynamic actions would be the fire of the order of the site, refresh the shuttle and update the selected employees. But I don't always get the right side of the shuttle, populated.  I tried the process a few times with debug and dynamic actions do not always work in the right order, and when they do, the right is not be filled.

    I know that the right side of the shuttle can be loaded, but the dynamic action on the ticket number also retrieves the values for another shuttle this shuttle is based on a static select statement.

    Any ideas on how to get the right side of the shuttle completed when the selection is based on a LOV cascading?

    Another idea, is possible to launch a dynamic action when the left side of the shuttle is filled.  Then I could store employees selected in a temporary variable and load them after the shuttle is filled.

    Thank you

    Ray Gillfillan

    I solved my problem.

    I added a variable temp for action dynamic ticket number for the value to be set on the right side of the shuttle.  I also added a refreshment after a dynamic action on the shuttle to set the value of the right side of the temp variable.

    Ray

  • Reuse cascading LOV in several pages?

    For example, if you page elements to make the car and identify the model, model car as element Parent LOV cascade so that every time the car has changed, the LOV for model would be updated. (Copied from documentation: P)

    Thus, the request for model car LOV is defined as

    select car_model d, car_model r
    from car_models
    where car_make=:CAR_MAKE
    
    

    And on the page, I establish a page CAR_MAKE and use it as the "Cascading LOV Parent article (s). So far so good.

    I want to use this LOV in another page. The problem is, APEX reject create me CAR_MAKE in another page, saying "name of the element is already used by another page or application.

    Addition of the LOV even for each page (only using linked different variable name), is there a solution?

    I thought to use a copy of the car to point application dynamic action game and referred to the point of Application in the LOV. Is it guaranteed that the dynamic action complete before the LOV is updated?

    Request Express 4.2.0.00.27

    Oracle 11g XE

    thtsang

    If the parent element names differ only in the number of page as in your example, you can use:

    select car_model d, car_model r
    from car_models
    where car_make=v('P'||:app_page_id||'_CAR_MAKE')
    

    Beware that you add the element relative to Cascading article (s) Parent LOV because apex generator won't recognize him.

    In this way, that you don't have to change the standard LOV when used on a new page.

    Nicolette

  • JavaScript allows you to create cascading LOV to the tabular report only works on level 1

    I'm trying to implement a LOV cascading to a tabular report.  I have been using an example by Denes Kubicek (https://apex.oracle.com/pls/otn/f?p=31517:315).  I am able to get this example works when I'm on the workspace hosted APEX (workspacehttps://apex.oracle.com/pls/apex/f?p=67254:1 = COA demo/demo).  The example works as expected in the space of organized labor.

    My problem is when I take the application and import in a workspace internal APEX LOV Cascading sets the value of the first row in the table report; However, it does not define the following lines, and it does not dynamically change the values in the first rows of LOV, when another Department is selected.  I also tested the results by exporting the application on internal site to the hosted site. It works perfectly on the hosted site, but not inside.  Our internal APEX site is running version 4.2.2.00.11.

    The JavaScript code that is executed in dynamic Action is:

    elem var = ' # ' + this.triggeringElement.id;

    var = key "#", "f02_" + this.triggeringElement.id.substring (4);

    var set_list = ' # ', 'f04_' + this.triggeringElement.id.substring (4);

    var key_val = $(key) .val ();

    var elem_val = $(elem) .val ();

    var selected_val = ";

    (apex). Server.Process

    "getEmployees"

    {

    x 01: elem_val,.

    x 02: key_val

    },

    {

    success: function {(pData)

    $(set_list).find('option').remove ();

    $(pData, fonction (clé, innerjson) {} .each)

    $(set_list) .append ($("< option >', {})

    value: innerjson. VALUE,

    text: innerjson.NAME

    }))

    If (innerjson. SELECTED! = ") {selected_val = innerjson. SELECTED};

    });

    If (selected_val! = ") {}

    $('select'_+_set_list_+_'_option').each (function)

    {this.selected = (this.text == selected_val) ;})} ;

    }

    },

    }

    );

    Is it possible that our internal environment lacks some features used in code? How can I check to see if we have a missing function?  There are other reasons that the two environments react differently?

    Any help would be appreciated.

    Thank you

    PAM Zaske

    City of Arvada

    Arvada, Colorado

    Hello

    DBA should copy all images and static files to install image file zip to the web server.

    And of course old files need to be replaced.

    What web server you are using?

    Browser of witch you use when you test?

    When you test check browser console if there are JavaScript errors.

    Kind regards

    Jari

  • -Run Javascript - dynamic action wait full?

    Hello

    Apex 4.2

    I have a dynamic action that counts two real deposits

    (1) Execute javascript code that calls a plsql process to fill a graphical xml field hidden.

    (2) updates the table.

    The javascript call is made now apparently asynchronously, which means that the table is freshening up before the pl/sql has had time fill the data of chart_xml.

    I understand that some dynamic actions have an option "wait for result" of the execution, but is not available with JavaScript Code execution. I know almost nothing about Javascript, but I guess that this code:

    Apex. Server.Process ('P3_UPDATE_CHART_XML', {}

    F01: $.map ($('[Name="F01"]'), Function (e) {return $(e) .val ()})

    },{

    data type: "text",

    success: function (pData) {}

    });

    Can be adjusted to wait for the pl/sql process to complete?

    Out of my depth.

    Thank you

    Ralph

    Apex. Server.Process is indeed by asynchronous design. Now you can either make the browser wait the result by making it synchronous, or you can define a function sur-succes that run when the call is completed. Going with async, you can define follow-up actions, but "blocks" the browser in the meantime.

    Use the "async" parameter in the 3 param object:

    apex.server.process('P3_UPDATE_CHART_XML',{
    f01:$.map($('[name="f01"]'),function(e){return $(e).val()})
    },{
    async: false,
    dataType:"text",
      success:function(pData){}
    });
    

    Or, since you have the function success there, we can qualify the update region in this chart (but you should give the region to chart a static id) and do not use false async:

    apex.server.process('P3_UPDATE_CHART_XML',{
    f01:$.map($('[name="f01"]'),function(e){return $(e).val()})
    },{
    dataType:"text",
      success:function(pData){ $("#myChartRegionStaticId").trigger("apexrefresh"); }
    });
    

Maybe you are looking for