How to hide the Oracle APEX success message using JavaScript

How to hide the Oracle APEX success message using JavaScript

Hide Oracle APEX success message

Introduction

When building applications in Oracle APEX, it's common to display success messages to the user after specific actions, such as submitting a form or updating data. However, in some cases, it may be desirable to hide these success messages after a few seconds. This tutorial will help you implement a solution to this using JavaScript.

Video Tutorial

Steps

apex.jQuery(function() {
  apex.theme42.util.configAPEXMsgs({
    autoDismiss: true,
    duration: 3000  // duration is optional (Default is 3000 milliseconds)
  });
});
  • Go to the Global Page( Page30)

  • Click on Dynamic Actions

  • Create a Dynamic Action of type "Execute JavaScript Code" on the page load

  • Paste the copied code snippet. Adjust the duration and click OK, then Save the page.

Outcome

The message will be hidden after the duration specified in the code. Thus the user need not close the success message manually.