Highlight Search Keyword in Oracle Apex 5


Follow the steps below:
1. Copy and paste the following JavaScript to the page "Function and Global Variable Declaration" section
http://johannburkard.de/resources/Johann/jquery.highlight-5.js

2. Add the following style sheet to the page CSS inline section:
.highlight { background-color: yellow }

3. Create interactive report, set static id: highlight_report
4. Create two dynamic actions for the interactive report region
4.1 before refresh: 
Name: before refresh
Event: Before refresh
Region: is your interactive region
True Action: execute JavaScript Code

gv_search = $('#highlight_report_search_field').val()

4.2 After refresh
Name: after refresh
Event: After refresh
Region: is your interactive region
True Action: execute JavaScript Code

if (gv_search) {
$('td').highlight(gv_search);
}


Demo, go to use demo/demo and choose "Highlight Search Field"




2 comments:

  1. Not able to login into demo application.

    ReplyDelete
    Replies
    1. Thanks for letting me know. Problem has been fixed.

      Delete

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...