Richard
Richard

Reputation: 1

Javascript / Special Character Issue with Oracle Apex

I'm trying to implement this example to highlight a cell in an Oracle Apex report : https://doyensys.com/blogs/interactive-report-cell-highlight-based-on-condition-using-jquery-dynamically/

My report uses a query which accesses a Function and returns the cell color (eg: data-style="background-color:green"). This is step 1 in the above tutorial and works fine.

I have also completed step 2 and 3 successfully.

The problem, when I run the report, is that the background doesn't change. When I check the source code it is reading as

< span data-style=& quot;background-color:green& quot;>DATA</ span>

What is causing the replacement of " with & quot; and how can I stop the Javascript from seeing it this way?

When I manually use the following it works fine:

< span data-style="background-color:green">DATA</ span>

As per the tutorial I have specified < span #CHK_ENTRY#>#ENTRY#</ span> in the HTML Expression section.

Upvotes: 0

Views: 830

Answers (1)

eaolson
eaolson

Reputation: 15092

I'm not sure if you can suppress the escaping. You might check the CHK_ENTRY column and see if Escape Special Characters is turned on.

What you can certainly do is change the HTML Expression to <span data-style="#CHK_ENTRY#">... and change your CHK_ENTRY column to just the CSS and not the whole attribute.

Upvotes: 0

Related Questions