Highlight Search Term in APEX Interactive Report

Here is a tutorial on how to set up highlight search term in interactive report created by oracle Apex 4.2.
1. Download jquery.highlight-4.js and copy the content of this file to "Function and Global Variable Declaration" section under your page JavaScript tab (To go here, right click your page and choose Edit).
2. Go to "CSS" tab and add the following line into section "inline"
.highlight { background-color: yellow }
3.Create the first dynamic action
Name: before refresh
Event: Before Refresh
Select Type: Region
Region: choose the region you want to apply
True Actions: Execute JavaScript Code
Code: 
gv_search = $("#apexir_SEARCH").val();
Fire On Page Load: Yes
4. Create the second dynamic action
Name: after refresh
Event: After Refresh
Select Type: Region
Region: choose the region you want to apply
True Actions: Execute JavaScript Code
Code:
if (gv_search) {
$('.apexir_WORKSHEET_DATA td').highlight(gv_search);
}

Fire On Page Load: Yes

No comments:

Post a Comment

Datatable static image not found on the server

When you use ```datatables.min.css``` and ```datatables.min.js``` locally, instead of datatables CDN, you may have encountered that ```sort...