Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Different Ajax behaviour when run from Apex Builder or stand alone

InoLJun 5 2019 — edited Jun 6 2019

I am running Apex 19.1. I have tried to reproduce my problem on apex.oracle.com, but without success. So, this is a long shot....

The simplified situation is like this.

I have a procedure:

create or replace procedure hello(p_who in varchar2)

as

begin

  sys.htp.p('Hello '||p_who);

end;

An Ajax Callback  process:

hello(:P5_WHO);

A text item: P5_WHO.

A button with a Javascript DA:

hello();

A Javascript function:

function hello() {

    apex.server.process('hello', {

        pageItems: '#P5_WHO'

    }, {

            dataType: "text",

            success: function (pData) {

                console.log("hello result: " + pData);

                if ( pData ) {

                    apex.message.alert(pData);

                }

            }

        });

}

When I run the page from Apex Builder, I get the expected output in the console (Hello ...) and in the alert.

But, when I logout of the Apex Builder and run the page again in stand alone (runtime) mode, there is no pData.

I can also see it in the Developer toolbar of Chrome (network traffic). There is a request:

p_request: APPLICATION_PROCESS=Rekenen_stap1

p_json: {"pageItems":{"itemsToSubmit":[{"n":"P38_PROVISIE_BEHOUDEN","v":"N"}],"protected":"iiVk.....kY","rowVersion":"","formRegionChecksums":[]},"salt":"158854179772644815191688020872545788994"}

There is a response when the application is run from the Apex Builder.

But no response when run stand alone (not from the Builder): "This request has no response data available"

Has anybody else ever seen this behaviour?

Comments
Post Details
Added on Jun 5 2019
11 comments
1,278 views