Oracle Application Express (APEX 4.2) for ajax calls, apexajax

Source: Internet
Author: User

Oracle Application Express (APEX 4.2) for ajax calls, apexajax

Oracle Application Express 4.2 (APEX 4.2) is a quick web Application development tool. Ajax requests are sometimes used during web page development.

 

How to create an ajax request:

1. Create background processing:

Step 1

Step 2

Step 3

 

In this way, the background processing is completed.

 

2. Compile js on the frontend:

Function ajaxTest () {apex. server. process ('test', // name of the background processing, case sensitive {}, // parameter to be passed {ype: 'text', success: function (data) {console. log (data) ;}}) ;}ajaxtest ();

In this way, the console outputs hello world.

 

PS:

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

Apex. server. process ('test', // name of the background processing, case sensitive {// The x01-x10 is a public variable built into apex that can pass a general string. X01: 'param1', x02: 'param2 ',... x10: 'param10', // if there are many variables to be passed and the types are the same, you can use the array f01: ['param1', 'param2',...], f02: [...]}, {dataType: 'text', success: function (data) {console. log (data );}});

Plsql reference in background processing

Declarel_str1 varchar2 (20); l_str2 varchar2 (20); begin l_str1: = apex_application.g_x01; l_str2: = apex_application.g_f01 (1); -- note that plsql numbers start with 1 end;

 

Related Article

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.