Relative Content

Tag Archive for javascriptoracleapex

Countdown works only on active browser tab

I have a JavaScript function that I’m using in Oracle APEX, which assigns a countdown timer to an item on the page, counting down from 5 minutes to 0. When the value reaches 0, the user gets a modal prompt asking if they’re still on the page. The countdown works correctly, but only when the specific tab is open in the browser. When I have multiple tabs open, the countdown pauses and resumes only when I switch back to the tab with my application. I’d like this timer to run independently of whether the tab is open or not.