Ajax call resets the session?

All,

I got a general question about AJAX calls. During an Ajax call, which resets the session? I mean, if I put the session expires after 30 minutes and does it not everything hits server other than Ajax calls for 30 minutes, the session expires?

Thanks in advance.

Published by: user2865915 on June 17, 2011 07:22

user2865915 wrote:
All,

I got a general question about AJAX calls. During an Ajax call, which resets the session? I mean, if I put the session expires after 30 minutes and does it not everything hits server other than Ajax calls for 30 minutes, the session expires?

Session is kept alive due to the client HTTP calls. AJAX calls are HTTP requests. So no, the session has not expired.

Tags: Java

Similar Questions

  • SX20 block unwanted call during the session of the video conference

    Hi all

    It should be your advisor on it

    I have a set of SX20 that is configured as a standalone device (No. CUCM, VCS).

    Its work fine, able to make and receive calls through the IP address.

    Things in our video conference meeting, is sometimes a unwanted number would call us and disrupt the flow of the meeting.

    I don't know how they get our IP address, but we don't expect their call.

    Is there any way a setting to block many unwanted call us or disturb us during the video conference meeting.

    Is there any configuration that I need set the SX20 itself to prevent the unwanted phone number

    Please notify

    Titebiket

    This is probably a scan SIPVicious or similar, which is how the call is 'you find '.

    I have not tried it myself, but there is a selection option or not to allow incoming calls when already in a conference call:

     Conference 1 IncomingMultisiteCall Mode: Deny

    Wayne
    --
    Remember the frequency responses and mark your question as answered as appropriate.

  • ColdFusion scheduled task for HTML files with javascript ajax call to the web service

    I have a regular html file, which are generated dynamically (on access to it) for a few seconds (about 7 to 10 seconds) as tables, lines that are added through javascript after having treatment and this process takes about 7-10 seconds of said.

    Using settimeout(), after 15 seconds (to ensure that the content has been correctly filled), I use a web service (.cfc with function with intrusion via cfmail tag inside) through the ajax javascript call, which captures all the html content of the page and sends it to marked e-mail ID - which, during normal operations, works very well - which page is accessible in the browser web and left pending for desired time of 15-20 seconds.

    However, the same page when I programmed in CF admin (even with the time-out of 60 seconds), it never fires the e-mail part.

    Can I have some advice, where I am doing wrong!

    Hi, I mean the scheduled activity could be accomplished using CF native heavyweight instead of light and fast javascript codes codes. Not a big problem anyway.

  • With the code to run the session timeout

    I saw this problem asked and addressed on many other furums, but nobody came with a response, yet.

    I am trying to disconnect a user and end their session when they leave my site. How can I know when they leave my site? The only way I know is to wait a few seconds, and if they make a request to the server, they are gone. Disconnect them.

    I tried to just do a < cfajaxproxy > call to a cfc that returns just their application.sessiontimeout to 5 seconds, but it does not work. The session has no expiration time. I need to connect the outside user and the disconnection notice in a newspaper on the server and a logfile (not my idea. "This is the requirement of the customer.) I can get the cfc that I call by the tag < cfajaxproxy > to run log entries and I could kill the session here, but I need to give the page time to update and see if the user requests a page of my site or on an outside website. The problem is that if I do those things within the time of announcement of EFA execution with a counter or loop dlay, the page is not unload until the end of the call of CFCs. So, no matter how long lasts the delay, the session is already cleared bfore that loading of the next page.

    It's the old problem of want to logoff user when they leave the site, but not having is not a way to know where is located the landing page or the ability to delay a server action while the browser passes to the next query. If I can get a delay at work, the user can request a page on my site and I can reset the session before timeout. If they go to another site, eut session outside and they disconnects.

    Any help will be GREATLY appreciated. I spent days on this.

    Thank you

    CFGunny

    I had completely forgotten this post. I know it is very old, but I thought I'd post the real answer. The key was I needed establish if the user has left my site, unloading not only the current page and disconnect them if you leave my site. It is in fact not possible because there is no way to determine the URL TO which the browser will due to browser security restrictions, so I don't know if it's going to another page on my site or on another site. It's a little more complicated that just end a session when the page unloads. I didn't disconnect the user or kill their session each time that an empty page.

    The answer was to write a 'onUnload()' script that records the time of the unload event and the user's session ID (I actually used our user ID and put it in the database) and write a scheduled task that verifies all entries in the database against the current time and disconnects any users having a longer period, say 30 seconds. In order to avoid disconnecting all users (running every two minutes with a maximum time of 30 seconds, return all users), I wrote a script block in the onRequestStart in Application.cfc that checks the database for a record for this user and function, if the record exists, compares the time registration at the present time (now()). If the difference is greater than 30 seconds, the recording is marked and, if still connected, the user is disconnected and have to log in again. This ensures that the user is disconnected after thirty seconds, because the scheduled task runs only every two minutes. If the time is less than 30 seconds, the user continues without interference. Thus, if the user went to the site for more than two minutes, the scheduled task handles the database and actions disconnect. If the user is off-site for more than thirty seconds, but less than two minutes, the script in the onRequestStart function does the work.

    Thirty seconds time was a requirement of the customer and gives enough time for the next page to load, even if the user is on a slow network, but is short enough so that the user probably not going to another site, first. This method also allows the detailed collection of metrix, including the user, how many times they visit, how long they stay (on each page and an agregate), what URL, they came, etc., as well as normal metrix on-site as what pages they visited. These metrix became very important to the customer, is an agency of the federal Government and that they must justify their existence every year to get funding for next year, which part was my paycheck.

    I apologize to not include the code, but I left this project a year ago and do not have the code, not more. If I did it again, I'd probably write it a little differently (cleaning and CFScript), anyway. I hope this helps someone.

  • Whitelist config.xml does not work for some AJAX calls

    Hello

    Here's an excerpt from my config.xml file:

    http://www. .TV"/ >

    Here is the error I get: http://cl.ly/image/3r420g1Q2b1F

    You have to trust me that the fields are the same (in the AJAX call and config.xml). Indeed, this app works fine on the browser BB10, but not "wrapped" with WebWorks.

    What is strange, is that several other AJAX calls to the same area as planned work. I don't know where to look what could be the problem?

    Thank you.

    So first of all, the reason for which the application is refused is due to a known issue with URI invalid containing @ signs. Technically the sign @ is only a valid uri character forward as [email protected]/blah, and at other points should be % encoded.

    By your work around, the good work around would be to allow access uri = "" * ", which should solve this case."

    By disabling the security web, shall be carried out as a last resort, but your original implementation was correct except for one minor detail, the value should be 'disable' and NOT 'disabled', thus


       

    Finally, you can still file a bug on github

    Hope this clears up things.

  • How to reset the State of package variables in all sessions connected (without requiring a disconnection and a connect) if they are reset in one of connected sessions.


    Hi people,
    Need help, the example requires that the value of packet data 'g_var' must be updated in the session/s connected everywhere without the session/s to be disconnected and reconnected.
    Here's the scenario:

    I created a table my_table having the pair name / value.
    A variable with global package "g_var' in his body and a get accessor method to access g_var variable from the outside world.
    This variable g_var is initialized within the block of the entry into force of the package and retrieves the current value of the variable from my_table.
    When I update the value in the table a trigger on my_table would reset the State of the package and therefore g_var to the most recent value in the same session
    All is well so far since the change in value is reflected in the current session, but if I've already connected session/s
    and I'm trying to retrieve the value of "g_var", it is not updated in already connected sessions and remains the same before the update.
    Can U help please how can I update this value in a session/s connected without having to disconnect and reconnect.
    because if I disconnect and reconect the existing sessions, it seems to show the updated value.

    Thanks in advance.

    Kind regards
    Gaurav Rajput

    Here are the Scripts:


    drop table my_table;
    create table my_table
    (
    my_variable_name varchar2 (100),
    number of my_variable_value
    );

    create or replace package my_package as
    Function get_g_var return number;
    end my_package;
    /

    create or replace package body my_package as
    number of g_var;

    Function get_g_var return number is
    Start
    Return g_var;
    exception
    while others then
    lift;
    end get_g_var;

    procedure init (my_passed_name varchar2) is
    Start
    Select my_variable_value in the g_var from my_table where my_variable_name = my_passed_name;
    exception
    while others then
    raise_application_error (-20004, "I got an error during Init");
    end init;

    Start
    init ('$'); -This is a call to time when the package is loaded into the memory of session
    exception
    while others then
    raise_application_error (-20003, 'Error in my_package');
    end my_pACkage;

    /
    create or replace TRIGGER my_trigger
    BEFORE DELETE OR UPDATE
    ON my_table
    FOR EACH LINE
    declare
    number of my_ret;
    Start
    DBMS_SESSION.modify_package_state (DBMS_SESSION. RESET);
    exception
    while others then
    lift;
    end my_trigger;

    /

    -It is initially set to null
    insert into my_table values ('DOLLAR', 62);
    commit;

    -test value for first time to package loading (62 views)
    Select * from my_table;

    Set serveroutput on

    declare
    my_variable varchar2 (100);
    BEGIN
    my_variable: = my_package.get_g_var;
    dbms_output.put_line ($my_var);
    END;

    -run the same block of end to start in another session it shows 62. All is well so far
    -check if the value after the update in the same session (shows 38), also check in another before the connected session as well (shows 62 and not 38)
    Update my_table set my_variable_value = 38 where my_variable_name = "DOLLAR";
    commit;

    Select * from my_table;

    Set serveroutput on

    -It displays 38 in this session, but there in an already connected session 62 and only after you log out shows 38
    declare
    my_variable varchar2 (100);
    BEGIN
    -my_variable: = my_package.g_var;
    my_variable: = my_package.get_g_var;
    dbms_output.put_line ($my_var);
    END;

    Package variables are stored in the private memory (PGA). The value is not visible in the session. A package variable is therefore not approach appropriate to your problem. You can look at in the context of the Application, as Solomon has said.

    http://docs.Oracle.com/CD/B28359_01/network.111/B28531/app_context.htm#CIHFJHCG

  • Error when painting during the AJAX call page fault

    Hi all

    I do a simple AJAX call test with the emp table. In my page, I have a report, a search box and a button. You put in a text and click search and you will get the result that all the works.

    I have a requirement where if you click on the button and there is no search match you will be redirected to another page, just reload the report to display the result as usual.

    So, I took the road to AJAX where I perform a simultaneous when the user enters a text search and click on the button. If the search count (*) > 0 then return return County else returns 0.

    The code for the application process is:
    DECLARE
    begin
    CCOUNT number;
    
    
    
    begin
    Select count(*) into ccount 
    from emp
    WHERE 
    UPPER(:F_SEARCH_RESULT) like '%'||upper(ename)||'%';
    
    exception when no_data_found then
    htp.p(0);
    end;
    
    htp.p(ccount);
    
    
    END;
    My (still working on that) Java script code is:
    <script language="JavaScript" type="text/javascript">
    
    
         function search_count()
    
         var get = new htmldb_Get(null,null,'APPLICATION_PROCESS=SEARCH',0);
         get.add('F_SEARCH_RESULT', $v('P1_ENAME'));
         var gReturn = get.get();     
         console.log(gReturn);
    
         var gReturn_sanitised = praseFloat(gReturn);
              if (gReturn_sanitised == 1)
              doSubmit('SUBMIT');
         
              
    </script>
    I tested this code in Firebug, and when I do a console.log (gReturn) on the release of the AJax call I get this error that prevents me from dealing with the result of gReturn and be done with the code. The error looks like:
    <html><body>
    <h1>Error occurred while painting error page: ORA-01403: no data found</h1>
    </body></html>
    I tried adding exception when no_data_found but without success. Still get the same error. My version of the APEX is 4.2, any suggestion welcome. See you soon.

    Xrc xarg wrote:
    Still no luck, even if I'm doing a simple:

    begin
    htp.p('0');
    end;
    

    in the process of the page, I get the same error as before.

    I've done much AJAX call like this before elsewhere and can't for the life of find me whats wrong here.

    I have reproduced the issue in apex.oracle.com

    WORKSPACE: AIWORSKSPACE
    USER: TEST
    PASSWORD: test
    APP #: 69721
    Page: 1

    The point of application of F_SEARCH_RESULT had the security setting of default Session State Protection of Restricted - can not be set to the browser. Change this Unrestricted.

  • unique id extraction for the session call

    A stored procedure can be called by any of the 200 threads say leave within a java connection pool that all sign with say User1. Another similar pool can call the same da that are signed with USER2. Inside of the proc, I need to store some info SYS_CONTEXT and retrieve in the same call. I can't use a package header variable, because it is private to the thread. I can't use a global variable in the package BODY because between the value stored in the global variable BDY and recover another thread can call the same procedure and access the global variable of the BODY.

    I decide to keep in the ina SYS_CONTEXT info using a unique identifier for this thread as the ATTRIBUTE and the VALUE info. To compose the unique id for this thread, I issue the following SQl code. What combo will ensure me a unique id for the thread of tis that called the stored proc calls are synchronous meaning once a thread gets a connection from the pool to call the stored procedure, that he does not give up until the process finishes and returns a result to the thread.
    SELECT
    SYS_CONTEXT ('USERENV', 'SESSIONID')
    SYS_CONTEXT ('USERENV', 'SESSION_USER')
    SYS_CONTEXT ('USERENV', 'SESSION_USERID'),
    SYS_CONTEXT ('USERENV', 'SID')
    SYS_CONTEXT ('USERENV', 'HOST')
    SYS_CONTEXT ('USERENV', 'INSTANCE'),
    IN
    v_sessionid
    v_session_user
    v_session_userid
    v_host
    v_instance
    Of
    DOUBLE
    ;

    Hello

    A variable packed, a declared in the header or the body outside of any procedure or function, is unique in the database session. Each session will retain a value of each variable is used and the value will persist for the duration of the session. The availability of a variable will depend on where it is declared. A variable declared in the header of the packet will be available outside this package, because it can be called and used by any other package, procedure and function during the session. A variable declared in the body is local for the package only, but for the entire session. Note that a package and the body may be declared as a reusable series, which means that calls to the package to reset the State of the package and its variables.

    So in your case, the variable v_global_var will persist during the session, but will be available for the package pkg1. If you want this variable to be available outside the package, it must be declared in the header.

    Concerning
    André

  • I have the UI which downloads the file in file multiprt transfer in chuncks. It worked very well in a previous version of firefox, but now ajax calls gets abandoned?

    I have the UI which downloads the file in file multiprt transfer in chuncks (blob file). It worked very well in a previous version of firefox when we send chuncks 10 MB for each ajax calls. But now in the last version of firefox, its get rejected for 10Mo chuncks with every call, but allowing only 4 KB be sent for each call. You guys could help me. I also tried with the Application (/ octectstream). It also works very well in all browsers.

    Hi Sivasathy, support.mozilla.org is intended for management of the end user. If you have questions about web development please refer to the place to go for support the developers instead. Thank you for your understanding!

  • How to use the session ip phone 9971 call from speed dial

    Hello

    How can I use IP phone 9971 session call buttons to be used for line speed dial or intercom?

    Your help will be appreciated.

    Thank you

    You can not, you can only assign one of the 6 buttons line as another option, the session call buttons are dedicated to call the session.

  • APEX5: exceptions from AJAX calls not returned to the client

    I have a small question about the apex.server.process feature.

    I have a request where I do some AJAX requests to the server to do something. My JS (sample) code looks like this:

    apex.server.process("DO_SOMETHING", {
    }, {
        dataType: "text",
        success : function (pData) {
            alert(pData);
      }
    });
    

    The foo application process is defined as follows:

    BEGIN
    raise_application_error(-20001, 'exc');
    END;
    

    Now, I noticed that when I am connected to the request of the manufacturer, I get my alert with the message "sqlerrm: ORA-20001: exc ' (which I expected).

    If I connect to the generator and run my application, I get an empty alert message (ie: the pData in my success Manager parameter is empty, or better: the response of the network call is empty = > "this request has no data available response" chrome network logging).

    Is this as expected? If Yes, what is the reasoning (security as in "never disclose unhandled exceptions") and is there a setting/workaround, we use (short for catching exceptions and the sending of the response via htp.p data)

    I understand the fact that you should always do the appropriate error handling, but it's an internal application where I don't mind really if an unhandled exception is propagated to the client.

    I have a request on apex.oracle.com where it is reproduced, but given the behaviour depends on being connected to the APEX Builder I'm not confident to disclose identification for generating environmental information.

    Change the raise_application_error for:

    HTP.p ("exc");

    It is indeed strange that the behavior is different when running through the constructor, or directly. I have reproduced the same on apex.oracle.com

    Come to think of it: when running through the constructor, you can debug and use the developer toolbar. Maybe Apex handles exceptions differently to capture the output of the exception.

  • Call from the Complutense University of MADRID with Ajax service gives 404_Error

    Hi all

    I called a service of the University Complutense of MADRID (which runs a query in the background) in the context of application SSXA using AJAX call.

    (http://address:16290 / application-context-root/wcm/idc/cs/idcplg? IdcService = ServiceName & Parameters... & IsJson = 1 )

    But I am getting error ajax with responseText showing content = "404_Error"

    This query that is run also takes quite a long time say more than 80 s to run.

    This error could be due to some timeout? AJAX or UCM timeout? Because when this service is run from content server browser, we get the answer but a little late.

    Any idea what could be the cause?

    Concerning

    Instead of seeking to extend the time-out, have you thought about the long running query that causes the initial problem of fixing?  35 seconds for a query to return is excessive.

  • call to the Ajax process work does not correctly

    Hi guys Apex.

    I am new to apex and need a little help with a bug in my next javascript.

    I have an anonymous pl/sql block that shows me a list of products, so that the user can enter a few quantityes on those desired.

    I got another part of HTML that contains the JavaScript in this region, I check the quantity selected by the user (account product id and quantity entered) and the end of the page, there are 2 buttons.

    The first is to generate totals of runing, it works perfectly.

    The second add the products in the Collection (calling a callback procedure Ajax ADD_PRODUCTS) and finally in the same process of button, I save the order until the final table on my db, the latter a speech to another process to recall Ajax calles RECORD.

    The bug that I have is that the process is not save the entire products on my database, a few times for example if I get quantities for 10 products, the process saves me only 8 or 7, it's a random outcome.

    I looked at the code and seems that the problem is on my ADD_PRODUCTS process, because on my javascript where I call him, I have displayed on the screen, the total order quantity and runnign and it shows perfect, always.

    I use the Application Express 4.2.2.00.11 on DB SE

    next is:

    1 - Javascript

    2 - ADD_PRODUCTS ajax

    3 - RECORD Ajax

    Thanks for the tips,

    MJ

    -------

    1 JavaScript

    -------

    < ! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 / / IN" "http://www.w3.org/TR/html4/strict.dtd" > ""

    < html >

    < head >

    < meta http-equiv = "Content-Type" content = text/html"; charset = utf - 8 ">

    Totalizar < title > < / title >

    < script type = "text/javascript" >

    $(function () {})

    () $("#Calculate").click

    Mueve el valor al campo of amount

    function () {}

    var total = 0;

    var total_qty = 0;

    () $("input[name=f_qty]").each

    function () {}

    var amount = $(this) .val ();

    var productId = $(this).parents('tr') .find ("input [name = f_prod_id]") .val ();

    If (amount! == ") {}

    price var = $(this).parents('tr') .find ("input [name = f_unit_price]") .val ();

    var prodtotal = (quantity * price);

    Total = total + prodtotal;

    total_qty = total_qty + 1;

    }

    }

    );

    $('#printHere').html (decimalizer (total));

    $('#printHereqty').html (total_qty);

    }

    );

    funcion para formatear el resultado one shark 2 decimal places

    function decimalizer (input) {}

    var Test1 = 0;

    var test2 = 0;

    entry = Math.round(input * 100);

    If (input / 100 == Math.round(input / 100)) {}

    Test1 = 1;

    } ElseIf (entry / 10 == Math.round(input / 10)) {}

    Test2 = 1;

    }

    If (test1 == 1 & & test2 == 0) {}

    return (input / 100 + ".") 00');

    } ElseIf (test1 == 0 & & test2 == 1) {}

    return (input / 100 + '0');

    } else {}

    return (input / 100);

    }

    }

    -Starts process of application del pedido.

    Apply el Pedido

    () $("#Save").click

    -Add products to the collection

    function () {}

    () $("input[name=f_qty]").each

    function () {}

    var amount = $(this) .val ();

    var productId = $(this).parents('tr') .find ("input [name = f_prod_id]") .val ();

    If (amount! == ") {}

    $("#P1_CANTIDAD_PEDIDO").val (quantity);

    $("#P1_PRODUCT_ID").val (productId);

    Apex. Server.Process ("ADD_PRODUCTS", {}

    pageItems: ' #P1_CANTIDAD_PEDIDO, #P1_PRODUCT_ID.

    });

    }

    }

    );

    PlaceOrder();

    });

    -Add los productos end has the Collection-

    function placeorder() {}

    Apex. Server.Process ("SAVE", {pageItems: "#P1_CODIGO_CLIENTE, #P1_TIPO_CLIENTE"});

    var total = 0;

    var total_qty = 0;

    Alert ('Medal created');

    Poner en 0 las cantidades digitadas

    () $("input[name=f_qty]").each

    function () {}

    var amount = $(this) .val ();

    If (amount! == ") {}

    $(this) .val ('');

    }

    }

    );

    $('#printHere').html ((total));

    $('#printHereqty').html (total_qty);

    }

    });

    < /script >

    < / head >

    < body >

    < div id = "total" > < / div >

    < p >

    < strong > ORDER TOTAL:

    < span id = "printHere" > < / span >

    < facilities >

    < /p >

    < p >

    < strong > ORDER PRODUCTS:

    < span id = "printHereqty" > < / span >

    < facilities >

    < /p >

    < p align = "center" style = "" clear: both; ">"

    < button type = "button" style = "' make-weight: bold;background-color:lightgray;margin-left:auto;margin-right:auto;display:block;margin-top:0%;margin-bottom:0%" id = 'Calculate' > total 120 Hz < / button > "

    < /p >

    < p align = "left" style = "" clear: both; ">"

    < button type = "button" style = "' make-weight: bold;background-color:lightgray;margin-left:auto;margin-right:auto;display:block;margin-top:5%;margin-bottom:5%" id = "Save" > order < / button > "

    < /p >

    < / body >

    < / html >

    -------

    2 ADD_PRODUCTS

    -------

    Start

    apex_collection.add_member (p_collection_name = > 'ORDER',)

    p_c001 = >: P1_PRODUCT_ID,.

    p_c003 = > sib_precio_cte_prod ('001 ', ' 1776',: P1_PRODUCT_ID).

    p_c004 = >: P1_CANTIDAD_PEDIDO

    );

    END;

    -------

    3 SAVE

    -------

    declare

    number of l_order_id;

    l_count number;

    l_customer_id varchar2 (30): =: P1_CODIGO_CLIENTE;

    Start

    -Insert a row into the table Order Header

    insert into cab_orders (customer_id, order_total, order_timestamp, user_name)

    values (l_customer_id, upper(:APP_USER), null, systimestamp) back into l_order_id order_id;

    commit;

    insert into det_order (order_item_id, order_id, product_id, unit_price, quantity)

    Select null, l_order_id, to_number (c001), to_number (c003), to_number (c004) from apex_collections where collection_name = "ORDER";

    commit;

    -The value of the P1_numero_orden order point which was placed just

    : P1_numero_orden: = l_order_id;

    -Truncate the collection once the order has been placed

    apex_collection.create_or_truncate_collection (p_collection_name = > 'ORDER');

    l_count: = APEX_COLLECTION. COLLECTION_MEMBER_COUNT (p_collection_name = > 'ORDER');

    : P1_cantidad_registros: = l_count;

    end;

    It is no doubt a few classic miss the A in AJAX. When execute you a loop on the orders you make an ajax call for each, and after the loop, you trigger the placeorder ajax call. However, it might be that ajax add_products calls have not finished yet at the point where you call the placeorder call. This would explain the apparently random quantity of the entered orders: orders may simply not have made it in time to the collection.

    Another you're not processing orders where the quantity has not been met, but this probably isn't the cause since you mention that you have filled with quantities.

    The solution is to: have / do these add_order synchronous requests or B / keep them asynchronous and learn something new, called promises

    A crash the browser because do you wait before the end of his run - but it's maybe not really noticeable so would find you acceptable.

    apex.server.process("ADD_PRODUCTS", {
        pageItems: "#P1_CANTIDAD_PEDIDO,#P1_PRODUCT_ID"
    },
    {async: false})
    

    B is more interesting. You have a variable amount of ajax calls and want to wait until they have all completed in order to do something else. Promise interfaces provide this feature in the async environment and jquery has its own implementation of it. I suggest Googling it and read on this topic - its very interesting and it will be part of the future (alone, today!)

    $("#Save").click(
        // ----- Agregar los productos a la collection
        function () {
            //array to hold all the ajax requests
            var requests = Array();
            $("input[name=f_qty]").each(
                function () {
                    var quantity = $(this).val();
                    var productId = $(this).parents('tr').find("input[name=f_prod_id]").val();
                    if (quantity !== '') {
                        $("#P1_CANTIDAD_PEDIDO").val(quantity);
                        $("#P1_PRODUCT_ID").val(productId);
                        requests.push(
                          apex.server.process("ADD_PRODUCTS", {
                              pageItems: "#P1_CANTIDAD_PEDIDO,#P1_PRODUCT_ID"
                          })
                        );
                    };
                };
            );
            //when all ajax calls are completed act on the done callback
            var defer = $.when.apply($, requests);
            defer.done(function(){
              placeOrder();
            });
        });
    

    Here are some links with relevant information on this solution:

    Apex.Server.process JavaScript APIs

    The return value of this function is a jqXHR object. This is required to use the interface of the promise! Once again at the apex, the hats of the team for this great new feature ajax

    jQuery.Ajax. jQuery API Documentation

    Documentation on the jquery ajax function. It contains information about the jqXHR object and shows all the options available. For reference.

    Wait until any jquery ajax request are done? -Stack overflow

    jQuery when troubleshooting with a variable number of arguments - Stack Overflow

    StackOverflow questions / answers lets get this solution. More info in them!

    jQuery.when () | jQuery API Documentation

    When interface $ you see used

    https://developer.Mozilla.org/en-us/docs/Web/JavaScript/reference/Global_Objects/function/apply

    Information about using "apply" If you've not seen before. It has been used in the solution of SO due to the variable number of arguments - very interesting!

  • How to use the wait flag integrated at the level of the element during the AJAX call

    Hello
    I would like to use the integrated waiting indicator that appears next to the selection in cascade and textfields autocomplete lists in my own AJAX call. But I don't know how to attach to the question that I'm updating.
    Can someone help me in the right direction?

    In my case, I'm running the database to update the value of an elements to the screen. My Javascript looks like this
    function MY_FUNCTION
     (p_get_item1
     ,p_get_item2
     ,p_get_item3)
    {
      //create the AJAX call refering to the APEX application process
      var ajaxRequest = new htmldb_Get(null, $v('pFlowId'), 'APPLICATION_PROCESS=AP_NAME', $v('pFlowStepId'));    
      
      //put values on screen into APEX PL/SQL variables
      ajaxRequest.addParam('x01',$v(p_get_item1));
      ajaxRequest.addParam('x02',$v(p_get_item2));    
      ajaxRequest.addParam('x03',$v(p_get_item3));    
    
      //do the actual AJAX call 
      var ajaxResponse = ajaxRequest.get();   
      //and set the items on screen based on the JSON text returning  
      json_SetItems(ajaxResponse);  
    }
    Thanks in advance

    You must use jquery instead of htmldb_get to make real asynchronous, and then add the rotation like this icon

    I used the jquery post method to call the process of request here

    function MY_FUNCTION
    (p_get_item1, p_get_item2, p_get_item3) {
         //show indicator
         $('#YOUR_ITEM_NAME').after('');
    
         $.post('wwv_flow.show', {
              "p_request" : 'APPLICATION_PROCESS=AP_NAME',
              "p_flow_id" : $v('pFlowId'),
              "p_flow_step_id" : $v('pFlowStepId'),
              "p_instance" : $v('pInstance'),
              "x01" : $v(p_get_item1),
              "x02" : $v(p_get_item2),
              "x03" : $v(p_get_item3)
         },
              function (data) {
              //and set the items on screen based on the JSON text returning
              json_SetItems(ajaxResponse);
              //remove indicator
              $('#YOUR_ITEM_NAME').next(".loading-indicator").remove();
         });
    }
     
    
  • Need help to reset the setting SESSIONS

    Hi people,

    Environment: Oracle 10g Rel 2

    I'm trying to reduce the number of sessions to the database as follows

    * Wink # call existing values *.
    show parameters session;
    show parameters processes;
    show parameters transactions;
    
    sessions     integer  170
    processes    integer  150
    transactions integer  187
    * # Change the value of parameter SESSION *.
    alter system set sessions=3 scope=spfile;
    * # Bouncing the instance *.
    shutdown immediate; 
    * # Start the instance *.
    startup;
    * # Check if the new value takes effect *.
    show parameters session;
    
    Output: sessions integer     170
    * # Check if the new value is in spfile *.
    select NAME||','||VALUE||','||DISPLAY_VALUE||','||ISSPECIFIED
    from v$spparameter
    where NAME like 'session%'
    
    
    Output: sessions,3,3,TRUE
    * # Check if the database has been started with the spfile *.
    SELECT DECODE(value, NULL, 'PFILE', 'SPFILE') "Init File Type"
           FROM sys.v_$parameter WHERE name = 'spfile'
    
    
    Output: 
    
    Init F
    ------
    SPFILE
    Any ideas as to why the SESSIONS setting don't take effect?

    Thanks in advance

    rogers42

    Sessions setting is derived from the setting process, and in most cases, there should be no reason to set it and do not touch.

    Setting of 3 sessions is totally, absolutely stupid as background processes with sessions too.
    That could be another reason why Oracle happily choose to ignore your changes.

    You should spend more time to read the documents, in order to avoid further attempts to wreck Oracle and create more havoc.

    -----------------
    Sybrand Bakker
    Senior Oracle DBA

Maybe you are looking for