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!

Fetch/Process data using Async JS AJAX calls

Veerendra PatilJun 9 2023

Hi,

I am using APEX 22.1.

I am using a 3rd party JS plugin. I am using JS/AJAX processing to fetch and save data.

While I am trying to fetch and show the data, I am not able to maintain the sync. So I am not getting the results in correct order.

I tried referring to https://vmorneau.me/javascript-async-await/ and https://apex.oracle.com/pls/apex/r/gamma_dev/demo/js-async and tried using await/async, but no luck.

I have created a sample example of what I am looking for on apex.oracle.com

ws - vpwstest

user - testuser

pwd - abcABC@123

app - 92756 - VP Test App

page - 9 - Test Async JS

The page refers to JS file #APP_FILES#myjs.js

This JS has the code.

Basically I am looking to get the JS code executed in correct order

console.logs - In order

Starting Call F1

Starting Call F11

Calling F111

Calling F112

Calling F113

Calling F114

Finished F11

Finished F1

Starting Call F2

Starting Call F21

Calling F211

Calling F212

Calling F213

Calling F214

Finished F21

Finished F2

Starting Call F3

Return Val from F2

Finished F3

Please suggest.

Thanks

This post has been answered by Alexis Galdamez - Oracle-Oracle on Jun 12 2023
Jump to Answer
Comments
Post Details
Added on Jun 9 2023
7 comments
1,328 views