Ajax + apex 4.2 = apex.server.process api
This requires that you have a process at the process point at the request of the page or in the application process. In this case, you must call your function and specify parameters that may be page elements. To provide a return, enter the values ββin the http buffer with calls htp.p.
DECLARE
some_var1 VARCHAR2(50);
BEGIN
some_var1 := my_package.my_function(:P1_EMPNO, :P1_DEPTNO);
htp.p(some_var1);
END;
apex.server.process . - javascript.
: dataType JSON, , , json, . , , INVALID, !
apex.server.process ( "MY_PROCESS", {
pageItems: "#P1_DEPTNO,#P1_EMPNO"
}, {
dataType: "text"
, success: function( pData ) {
alert(pData);
if ( pData === 'INVALID' ) {
alert('The data you have entered is invalid');
};
}
} );
, , . PLSQL- , , , .
, , , . execute javascript ajax- .