Instead of click-popup solution you could use the Highlight and Compute features of IR:
- Add a computed column X representing a result of comparison to your report.
Actions->Format->Compute, use DECODE or CASE expressions to return 1 when date1 is lesser than date2.
- Highlight report rows with X=1.
Actions->Format->Highlight, select a condition and a color.
- Optionally hide the computed column.
Actions->Select Columns.
- Save report as default.
Actions->Save Report->Save As Default Report Settings.
If you steel want to check column values by JS, use Dynamic Action for report region on After Refresh event. For example, next code goes through rows of IR based on DEPT table and alerts DNAME and LOC columns:
var $dnames = $( 'td[headers=DNAME]', this.triggeringElement );
$( 'td[headers=LOC]', this.triggeringElement ).each( function( indx, El ) {
alert( $( El ).html() + " - " + $dnames.eq( indx ).html( ) );
} )
As you can see, I use report column aliases to filter cells.