首页 > 解决方案 > #APP_IMAGES# not woking in Javascript function in Oracle APEX 18.2

问题描述

I need to map an ISO country code in the data, to an associated flag icon in javascript.

However, this syntax isn't working. How do I use #APP_IMAGES# in a javascript function to get a handle to an image.

var country = {
                           "id":                    isoCode,
                           "name":                  covidData[i].COUNTRY_ALTERNATIVE_NAME,
                           "value":                 50,  // not used, dummy value
                           "status":                covidData[i].STATUS,
                           "fill":                  chartColors.general,
                           "longitude":             covidData[i].LONGITUDE,
                           "latitude":              covidData[i].LATITUDE,
                           "covax":                 covidData[i].COVAX_SUPPLY,
                           "covax_approved":        covidData[i].COVAX_APPROVED,
                           "mah":                   covidData[i].MAH,
                           "drug_product_supply":   covidData[i].DRUG_PRODUCT_SUPPLY,
                           "drug_substance_supply": covidData[i].DRUG_SUBSTANCE_SUPPLY,
                           "packing_release" :      covidData[i].PACKING_RELEASE,
                           "ema":                   covidData[i].EMA_FLAG,
                           "flag":                  "#APP_IMAGES#" + isoCode + ".png"
                          };

The focus is on this:

"flag":                  "#APP_IMAGES#" + isoCode + ".png"

I have tried "&AP_IMAGES.", and just a console log of this is giving me:

ariel/r/149/files/static/v289/

标签: oracleoracle-apex

解决方案


I believe the correct syntax is &APP_IMAGES.. Where is your JavaScript code? If it's in an external file, the substitution will not be made.


推荐阅读