Ajax calls in Oracle application Express (APEX 4.2)

Source: Internet
Author: User
Tags fast web

The Oracle Application Express 4.2 (APEX 4.2) is a fast Web application development tool. Ajax requests are sometimes used in the process of developing Web pages.

How to create an AJAX request:

1. Set up the background processing:

Step 1

Step 2

Step 3

This completes the creation of the background processing.

2. Compile JS at the front desk:

function ajaxtest () {    apex.server.process (' TEST ',/// Background processing name, case sensitive        {},//  The parameter to pass         {            dataType:' text ',            success:function(data) {                Console.log (data);}}    );} Ajaxtest ();

The console will then output Hello world.

Ps:

If you want to pass parameters, you can do this:

Apex.server.process (' TEST ',// Background processing name, case sensitive         {            ///  X01-X10 is a public variable that is built into apex and can pass a generic string.             x01: ' param1 ',            x02:' param2 ',            ...            X10:' PARAM10 ',            // If you want to pass a lot of variables, the type is consistent, you can use the array            f01:[' param1 ', ' Param2 ',...],            f02:[...]        },        {            dataType:' text ',            success:  function(data) {                console.log (data);            }        }    );

Plsql references in background processing

DECLAREvarchar2( varchar2); begin      l_str1:=apex_application.g_x01;     L_STR2:=apex_application.g_f01 (1); -- Note that the start of the plsql number is 1    End;

Ajax calls in Oracle application Express (APEX 4.2)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.