I’ve seen numerous solutions for partial page refreshes. All using javascript, timers etc.
I just want a report to refresh itself after 5 seconds.
I add this to the region-footer:
<script type="text/javascript">
<!--
setInterval( "$a_report('##REGION_ID#'.substring(1), 1, 7, 7);", 5000);
//-->
</script>
On request of Patrick Wolf (in the remarks below) this also works:
<script type="text/javascript">
<!--
setInterval("jQuery('##REGION_ID#').trigger('apexrefresh');", 5000);
//-->
</script>
No extra javascript functions, no dificult parameters, works for multiple regions..
Essentially it will do a region refresh using the $a_report apex-javascript function only once (after 5 seconds)..
But when the region gets refreshed…. this region-footer gets executed again…. hence: a refresh every 5 seconds.
$a_report takes these parameters:
- the region_id that needs to be refreshed. (apex puts an ‘R’ in front of it. the substring(1) removes the ‘R’ again)
- the 1st record to show
- the last record to show
- the number of records to show
- sorting
I hope this helps.

Hi,
but how do you refresh only one report region on a page using dynamic action tied to a button? thank you.
Thanks Richard,
Worked great for me. I was doing whole page refresh, but region refresh is match better. You don’t have a blinking page!
But instead of region number I placed div tag in header of the region and used it as a selector.
setInterval(“jQuery(‘#my_dev’).trigger(‘apexrefresh’);”, 5000);
Best,
Sofia
Please, how to implement a timer(hh:mi:ss) in oracle apex. I review the documentation but don“t understand, can you say me peer to peer how to do.
Thanks,
Wilson
@Wilson,
What exectly do you want to accomplish.
I’m happy to write an article.
regards,
Richard
Hi !
I tried to use the timer plugin but it refresh report with page items
but the with code snippet above it works great.
Regards Ola
Frank,
Hmm.. I don’t see where I’m using a plugin. Maybe you can try Patrick’s suggestion below. Otherwise try to get infromation from the plugin developer.
Regards,
Richard
I tried to use the timer plugin.
It works fine for periodically refresh reports (e.g. select to_char(sysdate,’HH24:MI:SS’) from dual), but I can’t get it working to refresh page items (or regions with page items).
Any suggestions to get this item refresh working with the timer plugin are welcome.
Thanks, Frank
Hi Richard,
I would suggest to not use undocumented and unsupported APEX Javascript APIs. It’s very likely that we will change them in the future.
If you are on APEX 4.0 you can use
jQuery('#STATIC_ID_OF_REGION').trigger('apexrefresh');
to refresh a region or you just use the “Refresh” dynamic action in combination with the Timer dynamic action plug-in from
Regards
Patrick