In oracle apex button click when i press button sevrel times, progress indicator shows multiple progress inditators how can we control it on just one. When click on more then one time it multiply by every click. thnx in advance
As above mentioned, I just want one indicator even I click several times…
You can disable the button after clicking it, or use a global variable to determine if the button has already been clicked.
document.getElementById("yourButtonId").addEventListener("click", function() {
// Disable the button
this.disabled = true;
// Show the progress indicator
apex.util.showSpinner();
// You can add other logic or asynchronous requests here
// Simulate asynchronous request completion, and then re-enable the button (optional)
setTimeout(() => {
this.disabled = false;
// Hide the progress indicator
apex.util.hideSpinner();
}, 5000); // Re-enable after 5 seconds
});
6